Ordering

public struct Ordering : Codable

A codable struct containing the ordering information

Usage Example:

To order ascending by name and descending by age, we would write:

   Ordering(by: .asc("name"), .desc("age"))
  • Creates an Ordering instance from one or more Orders

    Declaration

    Swift

    public init(by order: Order...)
  • Creates an Ordering instance from a given array of Orders.

    Declaration

    Swift

    public init(by order: [Order])
  • Returns an array of Orders

    Declaration

    Swift

    public func getValues() -> [Order]