SortKey

public struct SortKey

The SortKey is passed to the OrderBy clause to indicate the sort keys and their sort direction.

  • Indicates that the KeyPathString should be sorted in ascending order

    Declaration

    Swift

    public static func ascending<T>(_ keyPath: KeyPath<D, T>) -> SortKey
  • Indicates that the KeyPathString should be sorted in descending order

    Declaration

    Swift

    public static func descending<T>(_ keyPath: KeyPath<D, T>) -> SortKey