Documentation ¶
Index ¶
- func Dump(filesrc string, eg *xorm.Engine, tables []*schemas.Table) error
- func InitEngine(eg *xorm.Engine)
- func Load(filesrc string, eg *xorm.Engine, tables []ModelInterface) error
- func SetModelLock(b bool)
- func TransWarp(fn func(*Engine))
- type DataInfo
- type Engine
- func (this *Engine) DB() *xorm.Session
- func (this *Engine) ExtendEngine(parent Enginer)
- func (this *Engine) FindPage(db *xorm.Session, listPtr interface{}, page, limit int) int64
- func (this *Engine) GetEngine() *xorm.Engine
- func (this *Engine) IfErrorFatal(err error)
- func (this *Engine) Model(obj ModelInterface) interface{}
- func (this *Engine) SetEngine(eg *xorm.Engine)
- func (this *Engine) Table(tableNameOrBean interface{}) *xorm.Session
- func (this *Engine) ThrowSQL(msg string, data string)
- func (this *Engine) Transaction(call func())
- type Enginer
- type ExceptionSQL
- type IteratorHandler
- type Model
- func (this *Model) Alias(alias string) string
- func (this *Model) Cols(cols ...string) *Model
- func (this *Model) Delete() bool
- func (this *Model) Exists() bool
- func (this *Model) Get() bool
- func (this *Model) InitModel(obj ModelInterface)
- func (this *Model) Insert() bool
- func (this *Model) Match(column string, data interface{}) *Model
- func (this *Model) Must(cols ...string) *Model
- func (this *Model) Omit(cols ...string) *Model
- func (this *Model) SetData(data interface{}) *Model
- func (this *Model) Update() bool
- func (this *Model) Where(query string, args ...interface{}) *Model
- type ModelInterface
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
引擎结构体
type Enginer ¶
type Enginer interface { SetEngine(*xorm.Engine) GetEngine() *xorm.Engine DB() *xorm.Session Transaction(func()) }
引擎接口
type ExceptionSQL ¶
type ExceptionSQL struct {
try.ExceptionBase
}
警告级别错误
func (*ExceptionSQL) Name ¶
func (this *ExceptionSQL) Name() string
type IteratorHandler ¶
type IteratorHandler interface { List() interface{} //列表生成 Do(interface{}) error //列表处理 }
迭代处理接口
type Model ¶
type Model struct { Engine //继承引擎基类 // contains filtered or unexported fields }
type ModelInterface ¶
type ModelInterface interface { TableName() string //表名 PrimaryKey() interface{} //主键 ExtendEngine(Enginer) //继承引擎 InitModel(ModelInterface) //初始化模型 Enginer }
模型接口
Click to show internal directories.
Click to hide internal directories.