CSWhere
@objc
public final class CSWhere : NSObject, CSFetchClause, CSQueryClause, CSDeleteClause
The CSWhere serves as the Objective-C bridging type for Where.
See also
Where
-
The internal
NSPredicateinstance for theWhereclauseDeclaration
Swift
@objc public var predicate: NSPredicate { get } -
Initializes a
CSWhereclause with a predicate that always evaluates to the specified boolean valueMyPersonEntity *people = [transaction fetchAllFrom:CSFromClass([MyPersonEntity class]) fetchClauses:@[CSWhereValue(YES)]]];Declaration
Swift
@objc public convenience init(value: Bool)Parameters
valuethe boolean value for the predicate
-
Initializes a
CSWhereclause with a predicate using the specified string format and argumentsNSPredicate *predicate = // ... MyPersonEntity *people = [transaction fetchAllFrom:CSFromClass([MyPersonEntity class]) fetchClauses:@[CSWherePredicate(predicate)]];Declaration
Swift
@objc public convenience init(format: String, argumentArray: [NSObject]?)Parameters
formatthe format string for the predicate
argumentArraythe arguments for
format -
Initializes a
CSWhereclause that compares equalityDeclaration
Swift
@objc public convenience init(keyPath: KeyPathString, isEqualTo value: CoreDataNativeType?)Parameters
keyPaththe keyPath to compare with
valuethe arguments for the
==operator -
Initializes a
CSWhereclause that compares membershipDeclaration
Swift
@objc public convenience init(keyPath: KeyPathString, isMemberOf list: [CoreDataNativeType])Parameters
keyPaththe keyPath to compare with
listthe array to check membership of
-
Initializes a
CSWhereclause with anNSPredicateDeclaration
Swift
@objc public convenience init(predicate: NSPredicate)Parameters
predicatethe
NSPredicatefor the fetch or query
View on GitHub
CSWhere Class Reference