Skip to content

mekanika/adapter-mongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published