0.1.0 • Published 9 years ago

mekanika-adapter-mongo v0.1.0

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

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 test

To lint the code:

npm run lint

To generate coverage reports:

npm run coverage

License

Copyright 2013-2015 Mekanika

Released under the MIT License (MIT)