node-modules/mongodb-client

Name: mongodb-client

Owner: node_modules

Description: A nice API client for MongoDB.

Created: 2016-02-24 15:45:09.0

Updated: 2018-04-02 12:58:13.0

Pushed: 2017-01-26 04:11:04.0

Homepage: null

Size: 14

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

mongodb-client

NPM version build status Test coverage David deps npm download

A nice API client for MongoDB.

Features
Installation
m install mongodb-client
Quick start
t co = require('co');
t MongoDB = require('mongodb-client');

t db = new MongoDB('mongodb://localhost:27017/myproject');
isten db connect error event
n('error', err => {
nsole.error(err);

ait for db connected
eady(() => {
 let's read and write
(function*() {
const result = yield db.collection('user').insertMany([
  { name: 'fengmk2', type: 'JavaScript' },
  { name: 'dead-horse', type: 'JavaScript' },
  { name: 'tj', type: 'go' },
]);
console.log(result);

const docs = yield db.collection('user').find({ type: 'JavaScript' }).skip(10).toArray();
console.log(docs);
.catch(err => {
console.error(err);
console.error(err.stack);
;

License

MIT


APIs

CURD
Insert Documents

TBD

Modify Documents

TBD

Query Documents

TBD

Remove Documents
Indexes

TBD

Aggregation

TBD

Administration

TBD


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.