Documentation ¶
Index ¶
- type DB
- type DBConfig
- type DBResourceManager
- type DatabaseManager
- type Repo
- func (repo *Repo) Exec(sql string, args ...interface{}) (sql.Result, error)
- func (repo *Repo) Find(bean interface{}, condiBeans ...interface{}) error
- func (repo *Repo) Get(bean interface{}) (bool, error)
- func (repo *Repo) In(column string, args ...interface{}) *xorm.Session
- func (repo *Repo) Insert(beans ...interface{}) (int64, error)
- func (repo *Repo) InsertOne(beans interface{}) (int64, error)
- func (repo *Repo) NewSession() *xorm.Session
- func (repo *Repo) Query(sql string, paramStr ...interface{}) (resultsSlice []map[string][]byte, err error)
- func (repo *Repo) Select(query string) *xorm.Session
- func (repo *Repo) SetTableName(name string)
- func (repo *Repo) ShowSQL(b bool)
- func (repo *Repo) Where(query interface{}, args ...interface{}) *xorm.Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBConfig ¶
type DBConfig struct { MaxIdle int `json:"max_idle" toml:"max_idle" yaml:"max_idle" mapstructure:"max_idle"` MaxOpen int `json:"max_open" toml:"max_open" yaml:"max_open" mapstructure:"max_open"` MaxIdleLife int `json:"max_idle_life" toml:"max_idle_life" yaml:"max_idle_life" mapstructure:"max_idle_life"` IsDebug bool `json:"is_debug" toml:"is_debug" yaml:"is_debug" mapstructure:"is_debug"` Datasource string `json:"data_source" toml:"data_source" yaml:"data_source" mapstructure:"data_source"` DbType string `json:"-" toml:"-" yaml:"-" mapstructure:"-"` }
type DBResourceManager ¶
type DBResourceManager struct {
// contains filtered or unexported fields
}
func New ¶
func New(conf *viper.Viper) *DBResourceManager
func (*DBResourceManager) Get ¶
func (db *DBResourceManager) Get(name string) *DatabaseManager
type DatabaseManager ¶
DatabaseManager
type Repo ¶
Repo Reference xorm
func (*Repo) NewSession ¶
func (*Repo) SetTableName ¶
Click to show internal directories.
Click to hide internal directories.