mesh-loki-ds-bus

2.0.4 • Public • Published

Streamable data store bus for LokiJS, an in-memory JavaScript database. Action docs on this library can be viewed here: https://github.com/crcn/mesh.js/blob/master/docs/adapters/data-stores.md.

Installation: npm install mesh-loki-ds-bus

basic example:

var mesh      = require("mesh");
var LokiDsBus = require('mesh-loki-ds-bus');
var loki      = require('lokijs');

// setup the DB
var dsBus = LokiDsBus.create({
  target: new loki(__dirname + "/db.json")
});

var cursor = dsBus.execute({
  collection : 'people',
  action     : 'name',
  data       : [
    { name: "Sleipnir"    , legs: 8 },
    { name: "Jormungandr" , legs: 0 },
    { name: "Hel"         , legs: 2 }
  ]
});

cursor.readAll().then(function(people) {

});

LokiDsBus.create(options)

Creates a new loki data store bus.

  • options
    • target - the target loki instance.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.4
    0
    • latest

Version History

Package Sidebar

Install

npm i mesh-loki-ds-bus

Weekly Downloads

0

Version

2.0.4

License

ISC

Last publish

Collaborators

  • architectd
  • crcn