Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseModel ¶
type BaseModel struct {
// contains filtered or unexported fields
}
func (*BaseModel) GetSession ¶
type List ¶
type List []interface{}
Funnel screening condition For example, "filters":{"user_state":[0,1],"phone_state":[0]} means "where user_state in(0,1) and phone_state = 0"
type Option ¶
type Option func(o *Options)
func WithDefaultOrder ¶
func WithDefaultPageSize ¶
func WithSession ¶
type Order ¶
Order condition 1 = ASC, -1 = DESC For example, "orders":[{"created_at":1},{"id":-1}] means "order by created_at asc, id desc"
type PageQuery ¶
type PageQuery struct { Page int Size int Q Q Filters Filters Orders Orders ExtraQuery QueryHandler }
List query with page For example,
{ "page": 1, "size": 20, "q": "x", "orders": [ { "created_at": 1 }, { "id": -1 } ], "filters": { "user_state": [ 0, 1 ], "phone_state": [ 0 ] } }
type Q ¶
Fuzzy search For example, "sheldon": []string{"username", "phone"} means "username like %sheldon% or phone like %sheldon%"
type Query ¶
type Query struct { Q Q Filters Filters Orders Orders ExtraQuery QueryHandler }
List query without page
type QueryHandler ¶
Click to show internal directories.
Click to hide internal directories.