query

package
v0.5.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL