Documentation ¶
Index ¶
Constants ¶
View Source
const (
// FromQueryTag tag标记
FromQueryTag = "search"
)
Variables ¶
This section is empty.
Functions ¶
func MakeCondition ¶
func MakeCondition(q interface{}, page ...Pagination) func(db *xorm.Session) *xorm.Session
func ResolveSearchQuery ¶
ResolveSearchQuery 解析 *
- exact / iexact 等于
- contains / icontains 包含
- gt / gte 大于 / 大于等于
- lt / lte 小于 / 小于等于
- startswith / istartswith 以…起始
- endswith / iendswith 以…结束
- in
- isnull
- order 排序 e.g. order[key]=desc order[key]=asc
Types ¶
type Pagination ¶
type XormCondition ¶
type XormCondition struct { XormPublic Join []*XormJoin }
func (*XormCondition) SetJoinOn ¶
func (e *XormCondition) SetJoinOn(t, table, on string) Condition
type XormPublic ¶
type XormPublic struct { Where map[string][]interface{} In map[string][]interface{} Order []string Or map[string][]interface{} }
func (*XormPublic) SetIn ¶
func (e *XormPublic) SetIn(k string, v []interface{})
func (*XormPublic) SetOr ¶
func (e *XormPublic) SetOr(k string, v []interface{})
func (*XormPublic) SetOrder ¶
func (e *XormPublic) SetOrder(k string)
func (*XormPublic) SetWhere ¶
func (e *XormPublic) SetWhere(k string, v []interface{})
Click to show internal directories.
Click to hide internal directories.