Versions in this module Expand all Collapse all v0 v0.0.3 Feb 4, 2021 v0.0.2 Feb 3, 2021 Changes in this version + 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 string + const Must + const MustNot + const Should + type Cond struct + BoolType BoolType + Field string + QueryType QueryType + SQLOperator string + Value interface{} + 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 interface + Count func(o interface{}) (int, error) + Delete func(o interface{}) error + Get func(o interface{}) error + GetBy func(field string, value interface{}, t interface{}, to interface{}) (error, Result) + GroupBy func(o interface{}, selectField, groupField string, haveQuery string, ...) (error, map[string]interface{}) + RegisterSchema func(t interface{}) error + Save func(o interface{}) error + Search func(t interface{}, to interface{}, q *Query) (error, Result) + Update func(o interface{}) error + type Query struct + Conds []*Cond + From int + RawQuery string + Size int + Sort *[]Sort + type QueryType string + const Match + const RangeGt + const RangeGte + const RangeLt + const RangeLte + type Result struct + Result interface{} + Total int + func GetBy(field string, value interface{}, t interface{}, to interface{}) (error, Result) + func Search(t interface{}, to interface{}, q *Query) (error, Result) + type Sort struct + Field string + SortType SortType + type SortType string + const ASC + const DESC