Lucee object methods reference
Object Method Query.sort
Sorts the query based on the column specified and the order criteria given. Modifies the original query object
Query.sort(any columnNameOrSortFunc,[string direction]):query
Category
query,sort
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
Name | Type | Required | Default Value | Description |
---|---|---|---|---|
columnNameOrSortFunc | any | Yes | a list of names, a single column name or a function used as comparator. | |
direction | string | No | a list of directions or a single direction definition (asc,desc), the list must have the same length as the columnName list. ONly used when the second argument defines a list of column names. |