Documentation ¶
Index ¶
- Constants
- type CacheConfig
- type Cnd
- func (self *Cnd) AddOther(part string) *Cnd
- func (self *Cnd) Agg(logic int, key string, alias ...string) *Cnd
- func (self *Cnd) Asc(keys ...string) *Cnd
- func (self *Cnd) Between(key string, value1 interface{}, value2 interface{}) *Cnd
- func (self *Cnd) Cache(config CacheConfig) *Cnd
- func (self *Cnd) Desc(keys ...string) *Cnd
- func (self *Cnd) Distinct(keys ...string) *Cnd
- func (self *Cnd) Eq(key string, value interface{}) *Cnd
- func (self *Cnd) Fields(keys ...string) *Cnd
- func (self *Cnd) From(fromTable string) *Cnd
- func (self *Cnd) Groupby(keys ...string) *Cnd
- func (self *Cnd) Gt(key string, value interface{}) *Cnd
- func (self *Cnd) Gte(key string, value interface{}) *Cnd
- func (self *Cnd) In(key string, values ...interface{}) *Cnd
- func (self *Cnd) InDate(key string, value1 interface{}, value2 interface{}) *Cnd
- func (self *Cnd) IsNotNull(key string) *Cnd
- func (self *Cnd) IsNull(key string) *Cnd
- func (self *Cnd) Join(join int, table string, on string) *Cnd
- func (self *Cnd) Like(key string, value interface{}) *Cnd
- func (self *Cnd) Limit(pageNo int64, pageSize int64) *Cnd
- func (self *Cnd) Lt(key string, value interface{}) *Cnd
- func (self *Cnd) Lte(key string, value interface{}) *Cnd
- func (self *Cnd) NotBetween(key string, value1 interface{}, value2 interface{}) *Cnd
- func (self *Cnd) NotEq(key string, value interface{}) *Cnd
- func (self *Cnd) NotFields(keys ...string) *Cnd
- func (self *Cnd) NotIn(key string, values ...interface{}) *Cnd
- func (self *Cnd) NotLike(key string, value interface{}) *Cnd
- func (self *Cnd) Offset(offset int64, limit int64) *Cnd
- func (self *Cnd) Or(cnds ...interface{}) *Cnd
- func (self *Cnd) Orderby(key string, sortby int) *Cnd
- func (self *Cnd) ResultSize(size int64) *Cnd
- func (self *Cnd) Sample(size int64) *Cnd
- func (self *Cnd) Upset(keys []string, values ...interface{}) *Cnd
- type Condition
- type DefaultObject
- type FromCond
- type Index
- type JoinCond
- type Object
Constants ¶
View Source
const ( EQ_ = iota NOT_EQ_ LT_ LTE_ GT_ GTE_ IS_NULL_ IS_NOT_NULL_ BETWEEN_ BETWEEN2_ NOT_BETWEEN_ IN_ NOT_IN_ LIKE_ NOT_LIKE_ OR_ ORDER_BY_ LEFT_ RIGHT_ INNER_ SUM_ AVG_ MIN_ MAX_ CNT_ )
数据库操作类型枚举
View Source
const ( Id = "Id" Ignore = "ignore" Bson = "bson" Json = "json" Mg = "mg" True = "true" Date = "date" Dtype = "dtype" )
View Source
const ASC_ = 1
View Source
const DESC_ = 2
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheConfig ¶
缓存结果集参数
type Cnd ¶
type Cnd struct { ConditPart []string Conditions []Condition AnyFields []string AnyNotFields []string Distincts []string Groupbys []string Orderbys []Condition Aggregates []Condition Upsets map[string]interface{} Model Object Pagination dialect.Dialect FromCond *FromCond JoinCond []*JoinCond SampleSize int64 LimitSize int64 // 固定截取结果集数量 CacheConfig CacheConfig }
数据库操作汇总逻辑条件对象
func (*Cnd) NotBetween ¶
not between
type DefaultObject ¶ added in v1.0.5
type DefaultObject struct{}
func (*DefaultObject) GetTable ¶ added in v1.0.5
func (o *DefaultObject) GetTable() string
func (*DefaultObject) NewIndex ¶ added in v1.0.33
func (o *DefaultObject) NewIndex() []Index
func (*DefaultObject) NewObject ¶ added in v1.0.5
func (o *DefaultObject) NewObject() Object
Click to show internal directories.
Click to hide internal directories.