Ordering

public class Ordering

A small class to create parameters used for ordering the responses when querying an endpoint that returns a colleciton of resources. See: ChainableQuery.order(by order: Ordering...)

  • Initializes a new Ordering operator.

    Throws

    An error if the keypaths specified in the ordering are not valid.

    Declaration

    Swift

    public init(_ propertyKeyPath: String, inReverse: Bool = false) throws

    Parameters

    propertyKeyPath

    The key path of the property you are performing the Query.Operationagainst. For instance, “sys.id”`

    inReverse

    Specifies if the ordering by the sys parameter should be reversed or not. Defaults to false.

  • Initializes a new Ordering operator.

    Throws

    An error if the keypaths specified in the ordering are not valid.

    Declaration

    Swift

    public convenience init(sys: Sys.CodingKeys, inReverse: Bool = false) throws

    Parameters

    sys

    The Sys.CodingKey of the system property you are performing the Query.Operation against.

    inReverse

    Specifies if the ordering by the sys parameter should be reversed or not. Defaults to false.