mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-24 10:21:40 +01:00
WIP: reorganization of keypath utilities (in prep for @propertyWrappers)
This commit is contained in:
@@ -265,7 +265,7 @@ extension OrderBy.SortKey where D: CoreStoreObject {
|
||||
/**
|
||||
Indicates that the `KeyPathString` should be sorted in ascending order
|
||||
*/
|
||||
public static func ascending<K: DynamicKeyPath>(_ attribute: (D) -> K) -> OrderBy<D>.SortKey {
|
||||
public static func ascending<K: KeyPathStringConvertible>(_ attribute: (D) -> K) -> OrderBy<D>.SortKey {
|
||||
|
||||
return .ascending(attribute(D.meta).cs_keyPathString)
|
||||
}
|
||||
@@ -273,7 +273,7 @@ extension OrderBy.SortKey where D: CoreStoreObject {
|
||||
/**
|
||||
Indicates that the `KeyPathString` should be sorted in descending order
|
||||
*/
|
||||
public static func descending<K: DynamicKeyPath>(_ attribute: (D) -> K) -> OrderBy<D>.SortKey {
|
||||
public static func descending<K: KeyPathStringConvertible>(_ attribute: (D) -> K) -> OrderBy<D>.SortKey {
|
||||
|
||||
return .descending(attribute(D.meta).cs_keyPathString)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user