more source docs, deprecated some Where clause utilities

This commit is contained in:
John Rommel Estropia
2017-11-04 10:37:54 +09:00
parent 0430f66240
commit 8ce26c213d
6 changed files with 684 additions and 96 deletions

View File

@@ -105,6 +105,11 @@ public struct GroupBy<D: DynamicObject>: GroupByClause, QueryClause, Hashable {
public extension GroupBy where D: NSManagedObject {
/**
Initializes a `GroupBy` clause with a key path
- parameter keyPath: a key path to group results with
*/
public init<T>(_ keyPath: KeyPath<D, T>) {
self.init([keyPath._kvcKeyPathString!])
@@ -113,21 +118,41 @@ public extension GroupBy where D: NSManagedObject {
public extension GroupBy where D: CoreStoreObject {
/**
Initializes a `GroupBy` clause with a key path
- parameter keyPath: a key path to group results with
*/
public init<T>(_ keyPath: KeyPath<D, ValueContainer<D>.Required<T>>) {
self.init([D.meta[keyPath: keyPath].keyPath])
}
/**
Initializes a `GroupBy` clause with a key path
- parameter keyPath: a key path to group results with
*/
public init<T>(_ keyPath: KeyPath<D, ValueContainer<D>.Optional<T>>) {
self.init([D.meta[keyPath: keyPath].keyPath])
}
/**
Initializes a `GroupBy` clause with a key path
- parameter keyPath: a key path to group results with
*/
public init<T>(_ keyPath: KeyPath<D, TransformableContainer<D>.Required<T>>) {
self.init([D.meta[keyPath: keyPath].keyPath])
}
/**
Initializes a `GroupBy` clause with a key path
- parameter keyPath: a key path to group results with
*/
public init<T>(_ keyPath: KeyPath<D, TransformableContainer<D>.Optional<T>>) {
self.init([D.meta[keyPath: keyPath].keyPath])