new Query()
查询基类
Members
-
<static, constant> ORDER_ASC :string
-
正序
Type:
- string
-
<static, constant> ORDER_DESC :string
-
逆序
Type:
- string
-
<static, constant> SORT_CREATED :string
-
以创建时间排序
Type:
- string
-
<static, constant> SORT_ID :string
-
以ID排序
Type:
- string
Methods
-
execute(callback)
-
执行查询
Parameters:
Name Type Description callbackLycamPlus.Callback~normal -
order(order)
-
设置正序逆序
Parameters:
Name Type Description orderstring 可选:
Returns:
- Type
- LycamPlus.Query
-
page(page)
-
设置当前页码
Parameters:
Name Type Description pageint 当前页码
Returns:
- Type
- LycamPlus.Query
-
perPage(perPage)
-
设置每页容量
Parameters:
Name Type Description perPageint 每页容量
Returns:
- Type
- LycamPlus.Query
-
sort(key)
-
设置排序字段
Parameters:
Name Type Description keystring 排序字段
LycamPlus.Query.SORT_IDLycamPlus.Query.SORT_CREATED- 其余可用排序字段参考对应类下的SORT_字段
Returns:
- Type
- LycamPlus.Query