Documentation ¶
Index ¶
- func Count(o interface{}) (int, error)
- func Delete(o interface{}) error
- func Get(o interface{}) error
- func GroupBy(o interface{}, selectField, groupField, haveQuery string, ...) (error, map[string]interface{})
- func Register(name string, h ORM)
- func RegisterSchema(t interface{}) error
- func Save(o interface{}) error
- func Update(o interface{}) error
- type BoolType
- type Cond
- func And(conds ...*Cond) []*Cond
- func Combine(conds ...[]*Cond) []*Cond
- func Eq(field string, value interface{}) *Cond
- func Ge(field string, value interface{}) *Cond
- func Gt(field string, value interface{}) *Cond
- func Le(field string, value interface{}) *Cond
- func Lt(field string, value interface{}) *Cond
- func NotEq(field string, value interface{}) *Cond
- type ORM
- type Query
- type QueryType
- type Result
- type Sort
- type SortType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSchema ¶
func RegisterSchema(t interface{}) error
Types ¶
type BoolType ¶
type BoolType string
const Must BoolType = "must"
const MustNot BoolType = "must_not"
const Should BoolType = "should"
type Cond ¶
type ORM ¶
type ORM interface { RegisterSchema(t interface{}) error Save(o interface{}) error Update(o interface{}) error Delete(o interface{}) error Search(t interface{}, to interface{}, q *Query) (error, Result) Get(o interface{}) error GetBy(field string, value interface{}, t interface{}, to interface{}) (error, Result) Count(o interface{}) (int, error) GroupBy(o interface{}, selectField, groupField string, haveQuery string, haveValue interface{}) (error, map[string]interface{}) }
type QueryType ¶
type QueryType string
const Match QueryType = "match"
const RangeGt QueryType = "gt"
const RangeGte QueryType = "gte"
const RangeLt QueryType = "lt"
const RangeLte QueryType = "lte"
Click to show internal directories.
Click to hide internal directories.