domain~ SortDescriptor

A description of a sort applied to a property of a collection.

Constructor

new SortDescriptor(key, descendingopt)

Constructor.

Parameters:
NameTypeAttributesDescription
keystring

the property to sort on

descendingboolean<optional>

true to sort in descending order, false for ascending

Members

descending

Get the sorting direction.

key

Get the sort property name.

Methods

toUriEncoding(indexopt, propertyNameopt) → {string}

Get this object as a standard URI encoded (query parameters) string value.

If index is provided and non-negative, then the query parameters will be encoded as an array property named sorts. Otherwise just bare key and descending properties will be used. The descending property is only added if it is true.

Parameters:
NameTypeAttributesDefaultDescription
indexnumber<optional>

an optional array property index

propertyNamestring<optional>
sorts

an optional array property name, only used if index is also provided

Returns:

the URI encoded string

Type: 
string