1.1.3 • Published 9 years ago

dbstream-memory v1.1.3

Weekly downloads
90
License
MIT
Repository
github
Last release
9 years ago

dbstream-memory

Memory-based database API, compatible with the dbstream API

Usage

var db = require("dbstream-memory");
var connection = db.connect();

// write or update
var cursor = new connection.Cursor()
cursor.write({ id: 1, name: "Hello" });
cursor.write({ id: 2, name: "World" });
cursor.on("finish", function() {
  console.log("Saved 2 objects");
});
cursor.end();

// read
new connection.Cursor()
  .find({ id: 2 })
  .limit( 1 )
  .on("data", function (obj) {
    console.log("Loaded", obj);
  });

API

This module implements the dbstream API. For the complete documention see: https://github.com/avinoamr/dbstream

connect( object )
  • object a key-value map of existing objects
  • Returns a dbstream Connection object
1.1.3

9 years ago

1.1.2

9 years ago

1.1.0

9 years ago

0.1.0

9 years ago

0.0.1

9 years ago