Ordered
public class Ordered<EntryType> : Ordering where EntryType : FieldKeysQueryable
A small class to create parameters used for ordering the responses when querying an endpoint
that returns a collection of resources. This variation of an ordering takes a generic type parameter that
conforms to ResourceQueryable
in order to take advantage of the FieldKeys
available on your type.
See: ChainableQuery.order(by order: Ordering...)
-
Initializes a new
Ordering<EntryType>
operator.Throws
An error if the keypaths specified in the ordering are not valid.Declaration
Swift
public init(field: EntryType.FieldKeys, inReverse: Bool = false) throws
Parameters
field
The member of
FieldKeys
used to order your results.inReverse
Specifies if the ordering by the sys parameter should be reversed or not. Defaults to
false
.