Created
November 5, 2014 21:29
-
-
Save sstadelman/375d1d8ca43de3504239 to your computer and use it in GitHub Desktop.
[offline] filtering entities from the database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)fetchContactsWithCompletion:(void(^)(NSArray *entities))completion { | |
NSString *resourcePath = @"ContactCollection?$filter=length(company) gt 0 and length(function) gt 0"; | |
[self scheduleRequestForResource:resourcePath withMode:SODataRequestModeRead withEntity:nil withCompletion:^(NSArray *entities, id<SODataRequestExecution> requestExecution, NSError *error) { | |
if (entities) { | |
completion(entities); | |
} else { | |
NSLog(@"did not get any entities, with error: %@", error); | |
} | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment