mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-04-19 07:29:44 +02:00
WIP
This commit is contained in:
@@ -808,6 +808,39 @@ extension QueryChainBuilder where O: CoreStoreObject {
|
||||
return self.queryChain(appending: clause(O.meta))
|
||||
}
|
||||
|
||||
/**
|
||||
Adds a `GroupBy` clause to the `QueryChainBuilder`
|
||||
|
||||
- parameter keyPath: a key path to group the query results with
|
||||
- returns: a new `QueryChainBuilder` containing the `GroupBy` clause
|
||||
*/
|
||||
public func groupBy<T>(_ keyPath: KeyPath<O, FieldContainer<O>.Stored<T>>) -> QueryChainBuilder<O, R> {
|
||||
|
||||
return self.groupBy(GroupBy<O>(keyPath))
|
||||
}
|
||||
|
||||
/**
|
||||
Adds a `GroupBy` clause to the `QueryChainBuilder`
|
||||
|
||||
- parameter keyPath: a key path to group the query results with
|
||||
- returns: a new `QueryChainBuilder` containing the `GroupBy` clause
|
||||
*/
|
||||
public func groupBy<T>(_ keyPath: KeyPath<O, FieldContainer<O>.Virtual<T>>) -> QueryChainBuilder<O, R> {
|
||||
|
||||
return self.groupBy(GroupBy<O>(keyPath))
|
||||
}
|
||||
|
||||
/**
|
||||
Adds a `GroupBy` clause to the `QueryChainBuilder`
|
||||
|
||||
- parameter keyPath: a key path to group the query results with
|
||||
- returns: a new `QueryChainBuilder` containing the `GroupBy` clause
|
||||
*/
|
||||
public func groupBy<T>(_ keyPath: KeyPath<O, FieldContainer<O>.Coded<T>>) -> QueryChainBuilder<O, R> {
|
||||
|
||||
return self.groupBy(GroupBy<O>(keyPath))
|
||||
}
|
||||
|
||||
/**
|
||||
Adds a `GroupBy` clause to the `QueryChainBuilder`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user