Re: NSPredicate/NSExpression - can they solve this Core Data problem?
Re: NSPredicate/NSExpression - can they solve this Core Data problem?
- Subject: Re: NSPredicate/NSExpression - can they solve this Core Data problem?
- From: Ben Trumbull <email@hidden>
- Date: Sat, 3 Apr 2010 12:10:24 -0700
They are noted in the NSExpression.h header with API to create them and a comment to their functionality.
- Ben
> Is the use of SUBQUERY() documented anywhere? The only mention I've seen of it is in the reserved keywords section of the Predicate Format String Syntax guide.
>
> Dave
>
> On Apr 2, 2010, at 3:42 PM, Ben Trumbull wrote:
>
>> NSComparisonPredicate* exprPred = (NSComparisonPredicate*)[NSPredicate predicateWithFormat:@"SUBQUERY(self, $key, %@.$key != nil) == 0", obj];
>> NSExpression* expr = [exprPred leftExpression];
>> NSLog(@"expression subquery results = %@", [expr expressionValueWithObject:keys context:nil]);
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden