mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-28 12:21:51 +01:00
added type-erasers for CoreStoreObject property containers
This commit is contained in:
@@ -262,65 +262,17 @@ public extension OrderBy.SortKey where D: CoreStoreObject {
|
||||
/**
|
||||
Indicates that the `KeyPathString` should be sorted in ascending order
|
||||
*/
|
||||
public static func ascending<DSub, A, T>(_ attribute: (D) -> A) -> OrderBy<D>.SortKey where A: ValueContainer<DSub>.Required<T> {
|
||||
public static func ascending<T: AnyCoreStoreKeyPath>(_ attribute: (D) -> T) -> OrderBy<D>.SortKey {
|
||||
|
||||
return .ascending(attribute(D.meta).keyPath)
|
||||
}
|
||||
|
||||
/**
|
||||
Indicates that the `KeyPathString` should be sorted in ascending order
|
||||
*/
|
||||
public static func ascending<DSub, A, T>(_ attribute: (D) -> A) -> OrderBy<D>.SortKey where A: ValueContainer<DSub>.Optional<T> {
|
||||
|
||||
return .ascending(attribute(D.meta).keyPath)
|
||||
}
|
||||
|
||||
/**
|
||||
Indicates that the `KeyPathString` should be sorted in ascending order
|
||||
*/
|
||||
public static func ascending<DSub, A, T>(_ attribute: (D) -> A) -> OrderBy<D>.SortKey where A: TransformableContainer<DSub>.Required<T> {
|
||||
|
||||
return .ascending(attribute(D.meta).keyPath)
|
||||
}
|
||||
|
||||
/**
|
||||
Indicates that the `KeyPathString` should be sorted in ascending order
|
||||
*/
|
||||
public static func ascending<DSub, A, T>(_ attribute: (D) -> A) -> OrderBy<D>.SortKey where A: TransformableContainer<DSub>.Optional<T> {
|
||||
|
||||
return .ascending(attribute(D.meta).keyPath)
|
||||
return .ascending(attribute(D.meta).cs_keyPathString)
|
||||
}
|
||||
|
||||
/**
|
||||
Indicates that the `KeyPathString` should be sorted in descending order
|
||||
*/
|
||||
public static func descending<DSub, A, T>(_ attribute: (D) -> A) -> OrderBy<D>.SortKey where A: ValueContainer<DSub>.Required<T> {
|
||||
public static func descending<T: AnyCoreStoreKeyPath>(_ attribute: (D) -> T) -> OrderBy<D>.SortKey {
|
||||
|
||||
return .descending(attribute(D.meta).keyPath)
|
||||
}
|
||||
|
||||
/**
|
||||
Indicates that the `KeyPathString` should be sorted in descending order
|
||||
*/
|
||||
public static func descending<DSub, A, T>(_ attribute: (D) -> A) -> OrderBy<D>.SortKey where A: ValueContainer<DSub>.Optional<T> {
|
||||
|
||||
return .descending(attribute(D.meta).keyPath)
|
||||
}
|
||||
|
||||
/**
|
||||
Indicates that the `KeyPathString` should be sorted in descending order
|
||||
*/
|
||||
public static func descending<DSub, A, T>(_ attribute: (D) -> A) -> OrderBy<D>.SortKey where A: TransformableContainer<DSub>.Required<T> {
|
||||
|
||||
return .descending(attribute(D.meta).keyPath)
|
||||
}
|
||||
|
||||
/**
|
||||
Indicates that the `KeyPathString` should be sorted in descending order
|
||||
*/
|
||||
public static func descending<DSub, A, T>(_ attribute: (D) -> A) -> OrderBy<D>.SortKey where A: TransformableContainer<DSub>.Optional<T> {
|
||||
|
||||
return .descending(attribute(D.meta).keyPath)
|
||||
return .descending(attribute(D.meta).cs_keyPathString)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user