nkv.db
v0.1.1
Published
An easy to use and fast key-value database for sqlite3 written in C++ as a NodeJS module.
Downloads
2
Readme
nkv.db
An easy to use and fast key-valu database for sqlite3 written in C++ as a NodeJS module.
What is nkv?
nkv means Native Key Value, which means that the project's code is written in Native C++ and used as a NodeJS module.
Installation
- Install windows build tools if you don't have it:
npm install windows-build-tools --global
- For linux, install
build-essential
withapt
oryum
- Simply do
npm install nkv.db
Usage
This example does not use the Database class
const db = require('nkv.db');
db.database("data/db"); // set the database name
db.set('your_key', 'any value'); // add the value "any value" to the database with the identifier 'your_key'
This example uses the Database class
const Nkv = require('nkv.db');
const db = new Nkv.Database("table_name", "database_name");
db.set('your_key', 'any value'); // add the value "any value" to the database with the identifier 'your_key'