insert documents into a db with autoincrementing keys
Switch branches/tags
Nothing to show
Latest commit a4de7b4 Jun 19, 2013 @fb55 initial commit
Failed to load latest commit information. initial commit Jun 19, 2013
package.json initial commit Jun 19, 2013


a tiny module for inserting documents into a db with automatically increasing keys



var db = require("level")("./.db");


var sub = db.level("sub");

require("level-insert")(db, sub);

Only a single method is added: insert(data, cb), which inserts the data at the next key (starting at 1).

Additionally, the key for the counter at the original DB can be specified as the third parameter of initialization. Per default, the separator + prefix of the insertion database will be used.

License: BSD