Inherits from | |
Conforms to | |
Framework | /System/Library/Frameworks/CoreData.framework |
Availability | Available in iOS 3.0 and later. |
Declared in | NSFetchRequestExpression.h |
Companion guides |
Instances of NSFetchRequestExpression
represent expressions which evaluate to the result of executing a fetch request on a managed object context.
NSFetchRequestExpression
inherits from NSExpression
, which provides most of the basic behavior. The first argument must be an expression which evaluates to an NSFetchRequest
object, and the second must be an expression which evaluates to an NSManagedObjectContext
object. If you simply want the count for the request, the countOnly
argument should be YES
.
Returns an expression which will evaluate to the result of executing a fetch request on a context.
+ (NSExpression *)expressionForFetch:(NSExpression *)fetch context:(NSExpression *)context countOnly:(BOOL)countFlag
An expression that evaluates to an instance of NSFetchRequest
.
An expression that evaluates to an instance of NSManagedObjectContext
.
If YES
, when the new expression is evaluated the managed object context (from context) will perform countForFetchRequest:error:
with the fetch request (from fetch). If NO
, when the new expression is evaluated the managed object context will perform executeFetchRequest:error:
with the fetch request.
An expression which will evaluate to the result of executing a fetch request (from fetch) on a managed object context (from context).
NSFetchRequestExpression.h
Returns the expression for the receiver’s managed object context.
- (NSExpression *)contextExpression
The expression for the receiver’s managed object context. Evaluating the expression must return an NSManagedObjectContext
object.
NSFetchRequestExpression.h
Returns a Boolean value that indicates whether the receiver represents a count-only fetch request.
- (BOOL)isCountOnlyRequest
YES
if the receiver represents a count-only fetch request, otherwise NO
.
If this method returns NO
, the managed object context (from the contextExpression
) will perform executeFetchRequest:error:
: with the requestExpression
; if this method returns YES
, the managed object context will perform countForFetchRequest:error:
with the requestExpression
.
NSFetchRequestExpression.h
Returns the expression for the receiver’s fetch request.
- (NSExpression *)requestExpresson
The expression for the receiver’s fetch request. Evaluating the expression must return an NSFetchRequest
object.
NSFetchRequestExpression.h
This constant specifies the fetch request expression type.
enum { NSFetchRequestExpressionType = 50 };
NSFetchRequestExpressionType
Specifies the fetch request expression type.
Available in iOS 3.0 and later.
Declared in NSFetchRequestExpression.h
.
NSFetchRequestExpression.h
Last updated: 2009-03-05