A simple key-value database, fast and lightweight. Support Linux/Mac/IOS/Android
一个使用C++编写的轻量级的KV数据库,支持平台Linux/Mac/IOS/Android,可内嵌到你的应用或服务中。特点:轻量级(代码量1500行左右),高效率读写(可自己运行测试)。
#include "alphakv.hpp" USING_NS_HIVE; AlphaKV* pKey = new AlphaKV(); bool result = pKey->openDB("mydb"); result = pKey->set(key, keyLength, value, valueLength); uint32 valueLength; char* value = pKey->get(key, keyLength, &valueLength);