Documentation ¶ Index ¶ func C() criteria type Order type Page func P() Page func (p Page) Limit(offset, size int) Page func (p Page) Order(o Order) Page func (p Page) Sql() string type PageRet func NewPageRet(page Page) PageRet type Q type Val func Func(data string) Val func Literal(data interface{}) Val Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func C ¶ func C() criteria Types ¶ type Order ¶ type Order struct { Col string Sort sortenum.Sort } type Page ¶ type Page struct { Orders []Order Offset int Size int } func P ¶ func P() Page func (Page) Limit ¶ func (p Page) Limit(offset, size int) Page func (Page) Order ¶ func (p Page) Order(o Order) Page func (Page) Sql ¶ func (p Page) Sql() string order by age desc limit 2,1 type PageRet ¶ type PageRet struct { Items interface{} PageNo int PageSize int Total int HasNext bool } func NewPageRet ¶ func NewPageRet(page Page) PageRet type Q ¶ type Q interface { Sql() string And(q Q) Q Or(q Q) Q } type Val ¶ type Val struct { Data interface{} Type valtypeenum.ValType } func Func ¶ func Func(data string) Val func Literal ¶ func Literal(data interface{}) Val Source Files ¶ View all Source files query.go Click to show internal directories. Click to hide internal directories.