mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-24 10:21:40 +01:00
allow optionals in relationship keyPaths
This commit is contained in:
@@ -320,11 +320,21 @@ public func == <O, D>(_ keyPath: KeyPath<O, RelationshipContainer<O>.ToOne<D>>,
|
|||||||
return Where<O>(O.meta[keyPath: keyPath].keyPath, isEqualTo: object)
|
return Where<O>(O.meta[keyPath: keyPath].keyPath, isEqualTo: object)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func == <O, D>(_ keyPath: KeyPath<O, RelationshipContainer<O>.ToOne<D>>, _ object: D?) -> Where<O> {
|
||||||
|
|
||||||
|
return Where<O>(O.meta[keyPath: keyPath].keyPath, isEqualTo: object)
|
||||||
|
}
|
||||||
|
|
||||||
public func != <O, D>(_ keyPath: KeyPath<O, RelationshipContainer<O>.ToOne<D>>, _ object: D) -> Where<O> {
|
public func != <O, D>(_ keyPath: KeyPath<O, RelationshipContainer<O>.ToOne<D>>, _ object: D) -> Where<O> {
|
||||||
|
|
||||||
return !Where<O>(O.meta[keyPath: keyPath].keyPath, isEqualTo: object)
|
return !Where<O>(O.meta[keyPath: keyPath].keyPath, isEqualTo: object)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func != <O, D>(_ keyPath: KeyPath<O, RelationshipContainer<O>.ToOne<D>>, _ object: D?) -> Where<O> {
|
||||||
|
|
||||||
|
return !Where<O>(O.meta[keyPath: keyPath].keyPath, isEqualTo: object)
|
||||||
|
}
|
||||||
|
|
||||||
public func ~= <O, D, S: Sequence>(_ sequence: S, _ keyPath: KeyPath<O, RelationshipContainer<O>.ToOne<D>>) -> Where<O> where S.Iterator.Element == D {
|
public func ~= <O, D, S: Sequence>(_ sequence: S, _ keyPath: KeyPath<O, RelationshipContainer<O>.ToOne<D>>) -> Where<O> where S.Iterator.Element == D {
|
||||||
|
|
||||||
return Where<O>(O.meta[keyPath: keyPath].keyPath, isMemberOf: sequence)
|
return Where<O>(O.meta[keyPath: keyPath].keyPath, isMemberOf: sequence)
|
||||||
|
|||||||
Reference in New Issue
Block a user