SortKey
public struct SortKey
The SortKey is passed to the OrderBy clause to indicate the sort keys and their sort direction.
-
Indicates that the
KeyPathStringshould be sorted in ascending orderDeclaration
Swift
public static func ascending(_ keyPath: KeyPathString) -> SortKey -
Indicates that the
KeyPathStringshould be sorted in descending orderDeclaration
Swift
public static func descending(_ keyPath: KeyPathString) -> SortKey
-
Indicates that the
KeyPathStringshould be sorted in ascending orderDeclaration
Swift
public static func ascending<T>(_ keyPath: KeyPath<D, T>) -> SortKey -
Indicates that the
KeyPathStringshould be sorted in descending orderDeclaration
Swift
public static func descending<T>(_ keyPath: KeyPath<D, T>) -> SortKey
-
Indicates that the
KeyPathStringshould be sorted in ascending orderDeclaration
Swift
public static func ascending<T>(_ attribute: KeyPath<D, ValueContainer<D>.Required<T>>) -> SortKey where T : ImportableAttributeType -
Indicates that the
KeyPathStringshould be sorted in ascending orderDeclaration
Swift
public static func ascending<T>(_ attribute: KeyPath<D, ValueContainer<D>.Optional<T>>) -> SortKey where T : ImportableAttributeType -
Indicates that the
KeyPathStringshould be sorted in ascending orderDeclaration
Swift
public static func ascending<T>(_ attribute: KeyPath<D, TransformableContainer<D>.Required<T>>) -> SortKey where T : NSCoding, T : NSCopying -
Indicates that the
KeyPathStringshould be sorted in ascending orderDeclaration
Swift
public static func ascending<T>(_ attribute: KeyPath<D, TransformableContainer<D>.Optional<T>>) -> SortKey where T : NSCoding, T : NSCopying -
Indicates that the
KeyPathStringshould be sorted in descending orderDeclaration
Swift
public static func descending<T>(_ attribute: KeyPath<D, ValueContainer<D>.Required<T>>) -> SortKey where T : ImportableAttributeType -
Indicates that the
KeyPathStringshould be sorted in descending orderDeclaration
Swift
public static func descending<T>(_ attribute: KeyPath<D, ValueContainer<D>.Optional<T>>) -> SortKey where T : ImportableAttributeType -
Indicates that the
KeyPathStringshould be sorted in descending orderDeclaration
Swift
public static func descending<T>(_ attribute: KeyPath<D, TransformableContainer<D>.Required<T>>) -> SortKey where T : NSCoding, T : NSCopying -
Indicates that the
KeyPathStringshould be sorted in descending orderDeclaration
Swift
public static func descending<T>(_ attribute: KeyPath<D, TransformableContainer<D>.Optional<T>>) -> SortKey where T : NSCoding, T : NSCopying
-
Indicates that the
KeyPathStringshould be sorted in ascending orderDeclaration
Swift
public static func ascending<K>(_ attribute: (D) -> K) -> OrderBy<D>.SortKey where K : DynamicKeyPath -
Indicates that the
KeyPathStringshould be sorted in descending orderDeclaration
Swift
public static func descending<K>(_ attribute: (D) -> K) -> OrderBy<D>.SortKey where K : DynamicKeyPath
View on GitHub
SortKey Structure Reference