TableOrdering mixin。
方法
-
orderBy ([SortExprStr])
-
添加
命令
子句(设置结果集的顺序选项)。参数:
的名字 类型 论点 描述 SortExprStr
字符串|数组。<字符串> <可选> 要排序的列(和方向) 抛出:
-
当表达式无效时。
- 类型
- 错误
返回:
查询实例。例子
//参数作为列(和方向)来排序const query = table。选择(“foo”、“酒吧”)。orderBy('foo asc', 'bar desc') //用于排序const query = table的列(和方向)数组。选择(“foo”、“酒吧”)。orderBy(['foo asc', 'bar desc'])
-