mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-27 20:01:27 +01:00
work around issue that crashes the Swift 3.2 compiler (fixes #171)
This commit is contained in:
@@ -109,7 +109,7 @@ public struct Where: FetchClause, QueryClause, DeleteClause, Hashable {
|
||||
- parameter keyPath: the keyPath to compare with
|
||||
- parameter value: the arguments for the `==` operator
|
||||
*/
|
||||
public init(_ keyPath: KeyPath, isEqualTo value: Void?) {
|
||||
public init(_ keyPath: RawKeyPath, isEqualTo value: Void?) {
|
||||
|
||||
self.init(NSPredicate(format: "\(keyPath) == nil"))
|
||||
}
|
||||
@@ -120,7 +120,7 @@ public struct Where: FetchClause, QueryClause, DeleteClause, Hashable {
|
||||
- parameter keyPath: the keyPath to compare with
|
||||
- parameter value: the arguments for the `==` operator
|
||||
*/
|
||||
public init<T: QueryableAttributeType>(_ keyPath: KeyPath, isEqualTo value: T?) {
|
||||
public init<T: QueryableAttributeType>(_ keyPath: RawKeyPath, isEqualTo value: T?) {
|
||||
|
||||
switch value {
|
||||
|
||||
@@ -139,7 +139,7 @@ public struct Where: FetchClause, QueryClause, DeleteClause, Hashable {
|
||||
- parameter keyPath: the keyPath to compare with
|
||||
- parameter object: the arguments for the `==` operator
|
||||
*/
|
||||
public init<T: DynamicObject>(_ keyPath: KeyPath, isEqualTo object: T?) {
|
||||
public init<T: DynamicObject>(_ keyPath: RawKeyPath, isEqualTo object: T?) {
|
||||
|
||||
switch object {
|
||||
|
||||
@@ -158,7 +158,7 @@ public struct Where: FetchClause, QueryClause, DeleteClause, Hashable {
|
||||
- parameter keyPath: the keyPath to compare with
|
||||
- parameter list: the sequence to check membership of
|
||||
*/
|
||||
public init<S: Sequence>(_ keyPath: KeyPath, isMemberOf list: S) where S.Iterator.Element: QueryableAttributeType {
|
||||
public init<S: Sequence>(_ keyPath: RawKeyPath, isMemberOf list: S) where S.Iterator.Element: QueryableAttributeType {
|
||||
|
||||
self.init(NSPredicate(format: "\(keyPath) IN %@", list.map({ $0.cs_toQueryableNativeType() }) as NSArray))
|
||||
}
|
||||
@@ -169,7 +169,7 @@ public struct Where: FetchClause, QueryClause, DeleteClause, Hashable {
|
||||
- parameter keyPath: the keyPath to compare with
|
||||
- parameter list: the sequence to check membership of
|
||||
*/
|
||||
public init<S: Sequence>(_ keyPath: KeyPath, isMemberOf list: S) where S.Iterator.Element: DynamicObject {
|
||||
public init<S: Sequence>(_ keyPath: RawKeyPath, isMemberOf list: S) where S.Iterator.Element: DynamicObject {
|
||||
|
||||
self.init(NSPredicate(format: "\(keyPath) IN %@", list.map({ $0.cs_id() }) as NSArray))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user