indragiek / Objectivekvdb
Licence: bsd-3-clause
Objective-C wrapper for kvdb (https://github.com/dinhviethoa/kvdb)
Stars: ✭ 34
ObjectiveKVDB
kvdb
Objective-C wrapper forObjectiveKVDB is a super simple Objective-C wrapper for @dinhviethoa's kvdb, a key-value store written in C.
Submodule
To build the framework and run tests, the kvdb submodule needs to be cloned first by running:
git submodule update --init
Example Usage
All keys and values are stored as UTF-8 encoded string data. Only NSString
keys and values are supported.
KVDBDatabase *db = [KVDBDatabase databaseWithPath:@"/path/to/database.db"];
// Store a value
db[@"some key"] = @"some value";
// Delete a value
db[@"some key"] = nil;
// Enumerate values
for (int i = 0; i < 20; i++) {
NSString *stringValue = @(i).stringValue;
self.db[stringValue] = stringValue;
}
[db enumerateKeysAndValuesUsingBlock:^(NSString *key, NSString *value, BOOL *stop) {
NSLog(@"%@ : %@", key, value);
}];
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].