Documentation ¶
Index ¶
- Variables
- func Transaction(ctx ezcache.IContextRequest)
- type CacheContext
- type Confirmed
- type FindOneOptions
- type FindOptions
- type IObject
- type IndexKey
- type IndexKeyDirection
- type QueryIndex
- type RequestContext
- func (req *RequestContext) Cols(cols []string)
- func (req *RequestContext) ContainsCollection(name string) (has bool, err error)
- func (req *RequestContext) Create(columns map[string]interface{}) (err error)
- func (req *RequestContext) CreateByObject(data IObject) (err error)
- func (req *RequestContext) CreateIndexs(model mongo.IndexModel, opts ...*options.CreateIndexesOptions) (err error)
- func (req *RequestContext) Delete(columns map[string]interface{}) (err error)
- func (req *RequestContext) Find(opts ...*FindOptions) (list *arrayutil.ArrayList, err error)
- func (req *RequestContext) FindInIds(keys []database.Ident, subkeys []database.Ident, opts ...*options.FindOptions) (list *arrayutil.ArrayList, err error)
- func (req *RequestContext) First(opts ...*FindOneOptions) (data interface{}, err error)
- func (req *RequestContext) Index(index int, params ...interface{}) *RequestContext
- func (req *RequestContext) Init() (err error)
- func (req *RequestContext) Query(val bson.M) *RequestContext
- func (req *RequestContext) SubKey(key database.Ident) *RequestContext
- func (req *RequestContext) UpdateByObject(data maputil.IToMapAll) (err error)
- func (req *RequestContext) UpdateColumns(columns bson.M, opts ...*UpdateOptions) (err error)
- func (req *RequestContext) WithSubKeyTime(time time.Time) *RequestContext
- type TableIndex
- type TableIndexItem
- type UpdateOptions
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Transaction ¶
func Transaction(ctx ezcache.IContextRequest)
Types ¶
type CacheContext ¶
func NewCacheContext ¶
func NewCacheContext() *CacheContext
func (*CacheContext) GetCacheRequest ¶
func (ctx *CacheContext) GetCacheRequest() *ezcache.Cache
type Confirmed ¶
type Confirmed struct {
// contains filtered or unexported fields
}
type FindOneOptions ¶
type FindOneOptions = options.FindOneOptions
type FindOptions ¶
type FindOptions = options.FindOptions
type IndexKey ¶
type IndexKey struct { // 要创建的索引字段 Key string // 方向 Direction IndexKeyDirection }
type IndexKeyDirection ¶
type IndexKeyDirection int32
const ( // 按升序创建索引 IndexKeyDirection_Ascending IndexKeyDirection = 1 // 按降序来创建索引 IndexKeyDirection_Descending = -1 )
type QueryIndex ¶
type QueryIndex struct { Index *TableIndex Params []interface{} }
func NewQueryIndex ¶
func NewQueryIndex() *QueryIndex
func (*QueryIndex) GetKey ¶
func (t *QueryIndex) GetKey() string
func (*QueryIndex) ToMap ¶
func (t *QueryIndex) ToMap() (r bson.M)
type RequestContext ¶
type RequestContext struct { // 表信息 Table *database.Table // contains filtered or unexported fields }
func (*RequestContext) Cols ¶
func (req *RequestContext) Cols(cols []string)
func (*RequestContext) ContainsCollection ¶
func (req *RequestContext) ContainsCollection(name string) (has bool, err error)
func (*RequestContext) Create ¶
func (req *RequestContext) Create(columns map[string]interface{}) (err error)
func (*RequestContext) CreateByObject ¶
func (req *RequestContext) CreateByObject(data IObject) (err error)
func (*RequestContext) CreateIndexs ¶
func (req *RequestContext) CreateIndexs(model mongo.IndexModel, opts ...*options.CreateIndexesOptions) (err error)
func (*RequestContext) Delete ¶
func (req *RequestContext) Delete(columns map[string]interface{}) (err error)
func (*RequestContext) Find ¶
func (req *RequestContext) Find(opts ...*FindOptions) (list *arrayutil.ArrayList, err error)
func (*RequestContext) FindInIds ¶
func (req *RequestContext) FindInIds(keys []database.Ident, subkeys []database.Ident, opts ...*options.FindOptions) (list *arrayutil.ArrayList, err error)
func (*RequestContext) First ¶
func (req *RequestContext) First(opts ...*FindOneOptions) (data interface{}, err error)
func (*RequestContext) Index ¶
func (req *RequestContext) Index(index int, params ...interface{}) *RequestContext
func (*RequestContext) Init ¶
func (req *RequestContext) Init() (err error)
func (*RequestContext) Query ¶
func (req *RequestContext) Query(val bson.M) *RequestContext
func (*RequestContext) SubKey ¶
func (req *RequestContext) SubKey(key database.Ident) *RequestContext
func (*RequestContext) UpdateByObject ¶
func (req *RequestContext) UpdateByObject(data maputil.IToMapAll) (err error)
func (*RequestContext) UpdateColumns ¶
func (req *RequestContext) UpdateColumns(columns bson.M, opts ...*UpdateOptions) (err error)
func (*RequestContext) WithSubKeyTime ¶
func (req *RequestContext) WithSubKeyTime(time time.Time) *RequestContext
todo: 按照指定的月份
type TableIndex ¶
type TableIndex struct { // Fields []*TableIndexItem // Options *options.IndexOptions }
func (*TableIndex) GetParams ¶
func (ti *TableIndex) GetParams(data interface{}) (x []interface{})
type UpdateOptions ¶
type UpdateOptions = options.UpdateOptions
Click to show internal directories.
Click to hide internal directories.