Simple Globals implementation, inspired by Mumps Globals.
Via npm on Node:
npm install simpleglobals
Reference in your program:
var simpleglobals = require('simpleglobals');Create a database:
var db = simpleglobals.createDatabase();Get a node:
var customer = db.node('customers', 1234);Set and get a value:
db.node('customers', 1234, 'name').value('Adam');
var name = db.node('customers', 1234, 'name').value();Alternatively, you can use a node:
var adam = db.node('customers', 1234);
adam.node('name').value('Adam');
var name = adam.node('name').value();A node can be converted to a plain JavaScript object:
db.node('customers', 1234, 'name').value('Adam');
db.node('customers', 1234, 'age').value(800);
var obj = db.node('customers', 1234).toObject();
// obj is { name : 'Adam', age: 800 }A node can be defined from a plain JavaScript object:
db.node('customers', 1235).fromObject( { name: 'Eve', age: 700 });git clone git://github.com/ajlopez/SimpleGlobals.git
cd SimpleGlobals
npm install
npm test
TBD
- Persistence
- Samples
The current implementation is a naive one, all in-memory. It should be refactored to have a persistence store, using a database, file system, o NoSQL provider.
- A Universal NoSQL Engine, Using a Tried and Tested Technology.
- Extreme Database programming with MUMPS Globals, Chapter 1.
- Healthcare needs the help of the Node.js Community.
- A Phoenix rises.
- ewdGateway2: Node.js-based EWD Gateway for GT.M & Cache.
- NodeM: A Node.js binding to the GT.M language and database.
This module was inspired by the discussion Healthcare needs the help of the Node.js Community at Node.js mailing list, triggered by @rtweed.
- 0.0.1: Published.
Feel free to file issues and submit pull requests — contributions are welcome.
If you submit a pull request, please be sure to add or update corresponding
test cases, and ensure that npm test continues to pass.