Skip to content

Instantly share code, notes, and snippets.

@eedeebee
Created March 26, 2013 18:18
Show Gist options
  • Select an option

  • Save eedeebee/5247789 to your computer and use it in GitHub Desktop.

Select an option

Save eedeebee/5247789 to your computer and use it in GitHub Desktop.
MLDB Samples
var db = new mldb(); // default options
var doc = db.get("/messages/1", function(result) {
logger.debug("Doc content: " + JSON.stringify(result.doc));
});
var db = new mldb(); // default options
db.save({from: "test", to: "all", body: "wibble"},"/messages/1", {collection: "messages"},function(result) {
// now fetch it
db.get("/messages/1", function(result) {
// now print it
// now delete it
db.delete("/messages/1", function(result) {
// done
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment