0.1.0 • Published 11 years ago
mekanika-adapter-mongo v0.1.0
adapter-mongo
WIP. Do not use
Query envelope adapter for MongoDB
Usage
Require the adapter:
var adapter = require('mekanika-adapter-mongo');Then specify your MongoDB config:
adapter.config.host = '127.0.0.1';
adapter.config.port = '27017';
adapter.config.db = 'test';And pass Query envelopes to the .exec(qe, cb) method:
adapter.exec({do:'find',on:'users'}, myCallback );The function myCallback will be passed (error, results) as parameters on completion of the adapter execution. In the case of no errors, error will equal null.
Tests
To run the tests:
npm testTo lint the code:
npm run lintTo generate coverage reports:
npm run coverageLicense
Copyright 2013-2015 Mekanika
Released under the MIT License (MIT)
0.1.0
11 years ago