mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-11-18 06:38:28 +01:00
support transformable values
This commit is contained in:
1 parent
274a54451a
commit
e6aa72fb5f
13 files changed
+495
-117
No files matched your search
@@ -45,6 +45,16 @@ public extension DynamicObject where Self: CoreStoreObject {
|
||||
|
||||
return condition(self.meta)
|
||||
}
|
||||
|
||||
public static func ascending<O: CoreStoreObject, V: ImportableAttributeType>(_ attribute: (Self) -> ValueContainer<O>.Optional<V>) -> OrderBy {
|
||||
|
||||
return OrderBy(.ascending(attribute(self.meta).keyPath))
|
||||
}
|
||||
|
||||
public static func descending<O: CoreStoreObject, V: ImportableAttributeType>(_ attribute: (Self) -> ValueContainer<O>.Optional<V>) -> OrderBy {
|
||||
|
||||
return OrderBy(.descending(attribute(self.meta).keyPath))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user