Documentation
¶
Index ¶
- Constants
- func ConvertToBSONM(data any) (bson.M, error)
- func Init() (orm.ORM, error)
- type CtxKey
- type DBConn
- type IDModel
- type Model
- func (m Model) Asc(condition any) orm.ORMModel
- func (m Model) BulkWrite(datas any, order bool) error
- func (m Model) CheckOID()
- func (m Model) Create(data any) (id string, err error)
- func (m Model) Delete(data any) error
- func (m Model) Desc(condition any) orm.ORMModel
- func (m Model) Find() orm.ORMQuary
- func (m Model) GetCollection(dest any) string
- func (m Model) GetContext() context.Context
- func (m Model) GetValue(key string) (any, bool)
- func (m Model) Limit(limit int) orm.ORMModel
- func (m Model) Offset(offset int) orm.ORMModel
- func (m Model) Page(page, limit int) orm.ORMModel
- func (m Model) Save(data any, value ...any) (id string, err error)
- func (m Model) Session(transactionFunc func(SessionContext context.Context) error) error
- func (m Model) SetContext(ctx context.Context) orm.ORMModel
- func (m Model) SetValue(key string, value any) orm.ORMModel
- func (m Model) Update(data any, value ...any) error
- func (m Model) Where(condition any, value ...any) orm.ORMModel
- func (m Model) WhereGt(condition any, value ...any) orm.ORMModel
- func (m Model) WhereGte(condition any, value ...any) orm.ORMModel
- func (m Model) WhereIs(key string, value any) orm.ORMModel
- func (m Model) WhereLt(condition any, value ...any) orm.ORMModel
- func (m Model) WhereLte(condition any, value ...any) orm.ORMModel
- func (m Model) WhereNot(condition any, value ...any) orm.ORMModel
- func (m Model) WhereOr(condition any, value ...any) orm.ORMModel
- type Quary
- type Table
Constants ¶
View Source
const ( WhereIs = iota WhereNot WhereGt WhereLt WhereOr OrderAsc OrderDesc WhereGte WhereLte )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Model ¶
type Model struct {
Tx DBConn
Data any
OpList *sync.Map // key:操作模式Mode value:操作值
WhereList bson.M
Ctx *context.Context //上下文
Collection string
}
func (Model) GetContext ¶ added in v0.0.4
func (Model) SetContext ¶ added in v0.0.4
Click to show internal directories.
Click to hide internal directories.