new module:models/Sort(field)
Constructs a new Sort
.
Document representing a sort request.
Parameters:
Name | Type | Description |
---|---|---|
field |
String | The name of the field to sort on. |
- Source:
Members
(readonly) SortOrderEnum :String
Allowed values for the sort_order
property.
Type:
- String
- Source:
(inner, constant) asc
value: "asc"
- Source:
(inner, constant) desc
value: "desc"
- Source:
(inner) field :String
The name of the field to sort on.
Type:
- String
- Source:
(inner) sort_order :module:models/Sort.SortOrderEnum
The sort order to be applied when sorting. When omitted, the default sort order (ASC) is used.
Type:
- module:models/Sort.SortOrderEnum
- Source:
Methods
(static) constructFromObject(data, obj) → {module:models/Sort}
Constructs a Sort
from a plain JavaScript object, optionally creating a new instance.
Copies all relevant properties from data
to obj
if supplied or a new instance if not.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | The plain JavaScript object bearing properties of interest. |
obj |
module:models/Sort | Optional instance to populate. |
- Source:
Returns:
The populated Sort
instance.
- Type
- module:models/Sort