Created
April 6, 2018 10:23
-
-
Save tomblench/e80581182d72deb148b60488bb47de73 to your computer and use it in GitHub Desktop.
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
NSError *error; | |
CDTDatastoreManager *manager = [[CDTDatastoreManager alloc] initWithDirectory:@"/tmp" error:&error]; | |
CDTDatastore *store = [manager datastoreNamed:@"my_ds" error:&error]; | |
CDTDocumentRevision *rev = [CDTDocumentRevision revision]; | |
rev.body = [@{ @"hello" : @"world" } mutableCopy]; | |
[store createDocumentFromRevision:rev error:&error]; | |
[store ensureIndexed:@[@"hello"]]; | |
NSLog(@"Indexes: %@", [store listIndexes]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment