WIP: Query builders

This commit is contained in:
John Rommel Estropia
2017-07-05 08:45:10 +09:00
parent 32743b3aee
commit aff966aac9
25 changed files with 269 additions and 116 deletions

View File

@@ -47,7 +47,7 @@ public struct SectionBy {
- parameter sectionKeyPath: the key path to use to group the objects into sections
*/
public init(_ sectionKeyPath: RawKeyPath) {
public init(_ sectionKeyPath: KeyPathString) {
self.init(sectionKeyPath, { $0 })
}
@@ -59,7 +59,7 @@ public struct SectionBy {
- parameter sectionKeyPath: the key path to use to group the objects into sections
- parameter sectionIndexTransformer: a closure to transform the value for the key path to an appropriate section name
*/
public init(_ sectionKeyPath: RawKeyPath, _ sectionIndexTransformer: @escaping (_ sectionName: String?) -> String?) {
public init(_ sectionKeyPath: KeyPathString, _ sectionIndexTransformer: @escaping (_ sectionName: String?) -> String?) {
self.sectionKeyPath = sectionKeyPath
self.sectionIndexTransformer = sectionIndexTransformer
@@ -68,6 +68,6 @@ public struct SectionBy {
// MARK: Internal
internal let sectionKeyPath: RawKeyPath
internal let sectionKeyPath: KeyPathString
internal let sectionIndexTransformer: (_ sectionName: String?) -> String?
}