WIP: utilities for clauses

This commit is contained in:
John Rommel Estropia
2016-06-20 08:09:11 +09:00
parent e5a199489c
commit 3ccbce5c29
12 changed files with 722 additions and 190 deletions

View File

@@ -40,21 +40,32 @@ public final class CSGroupBy: NSObject, CSQueryClause, CoreStoreObjectiveCType {
/**
The list of key path strings to group results with
*/
@objc
public var keyPaths: [KeyPath] {
return self.bridgeToSwift.keyPaths
}
/**
Initializes a `CSGroupBy` clause with a key path string
- parameter keyPath: a key path string to group results with
*/
@objc
public convenience init(keyPath: KeyPath) {
self.init(GroupBy(keyPath))
}
/**
Initializes a `CSGroupBy` clause with a list of key path strings
- parameter keyPaths: a list of key path strings to group results with
- returns: a `CSGroupBy` clause with a list of key path strings
*/
@objc
public static func keyPaths(keyPaths: [KeyPath]) -> CSGroupBy {
public convenience init(keyPaths: [KeyPath]) {
return self.init(GroupBy(keyPaths))
self.init(GroupBy(keyPaths))
}