dddb 0.0.1

Dddb lightweight and simple key-value store


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

dlogger

Dddb lightweight and simple key-value store using std.json

Usage



import std.stdio;
import dddb;

void main() {

	auto db = new ddb("social.db");

    // set facebook value to fb 
	db.set("facebook", "fb");
	// set instagram value to insta
	db.set("instagram", "insta");

    // get facebook value
	writeln(db.get("facebook")); // fb
	// get instagram value
	writeln(db.get("instagram")); // insta

    // assertions
	assert(db.get("facebook") == "fb");
	assert(db.get("instagram") == "insta");
    

    // update facebook value to ffb
	db.update("facebook", "ffb");
	writeln(db.get("facebook")); // ffb

    // db.getkeys() return a list of all keys 
	writeln(db.getkeys()); 
}
Authors:
  • cvsae
Dependencies:
none
Versions:
0.0.6 2018-Jul-01
0.0.5 2018-Jul-01
0.0.4 2018-Mar-25
0.0.3 2018-Mar-25
0.0.2 2018-Mar-23
Show all 8 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 51 downloads total

Score:
1.4
Short URL:
dddb.dub.pm