2.0.4 • Published 9 years ago

mesh-loki-ds-bus v2.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
9 years ago

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.
2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago