SkillAgentSearch skills...

ObjectiveKVDB

Objective-C wrapper for kvdb (https://github.com/dinhviethoa/kvdb)

Install / Use

/learn @indragiek/ObjectiveKVDB
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

ObjectiveKVDB

Objective-C wrapper for kvdb

ObjectiveKVDB 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);
}];
View on GitHub
GitHub Stars33
CategoryDevelopment
Updated4y ago
Forks0

Languages

Objective-C

Security Score

75/100

Audited on Apr 21, 2021

No findings