WIP: objc utilities

This commit is contained in:
John Rommel Estropia
2016-06-19 02:40:25 +09:00
parent 3d5c4f8121
commit e5a199489c
19 changed files with 913 additions and 177 deletions

View File

@@ -38,15 +38,12 @@ import CoreData
public final class CSWhere: NSObject, CSFetchClause, CSQueryClause, CSDeleteClause, CoreStoreObjectiveCType {
/**
Initializes a `CSWhere` clause with an `NSPredicate`
- parameter predicate: the `NSPredicate` for the fetch or query
- returns: a `CSWhere` clause with an `NSPredicate`
The internal `NSPredicate` instance for the `Where` clause
*/
@objc
public static func predicate(predicate: NSPredicate) -> CSWhere {
public var predicate: NSPredicate {
return self.init(Where(predicate))
return self.bridgeToSwift.predicate
}
/**
@@ -100,6 +97,18 @@ public final class CSWhere: NSObject, CSFetchClause, CSQueryClause, CSDeleteClau
return self.init(Where(keyPath, isMemberOf: list))
}
/**
Initializes a `CSWhere` clause with an `NSPredicate`
- parameter predicate: the `NSPredicate` for the fetch or query
- returns: a `CSWhere` clause with an `NSPredicate`
*/
@objc
public static func predicate(predicate: NSPredicate) -> CSWhere {
return self.init(Where(predicate))
}
// MARK: NSObject