shoots-mongo

3.0.6 • Public • Published

API

Mongo.Collection 插入一条记录

  var mongo = require('shoots-mongo')(app);
  var doc = {
    name: 'go to office at 9:00 am',
    owner: 'wave',
    date: new Date(),
    year: 2015
  }

  var task = mongo.Collection('task');
  var result = yield task.insert(doc);

api

collection.findOne collection.find collection.insert collection.update collection.remove collection.softDelete collection.count

输出日志

DEBUG=shoots-mongo

测试

npm test

Readme

Keywords

none

Package Sidebar

Install

npm i shoots-mongo

Weekly Downloads

0

Version

3.0.6

License

ISC

Last publish

Collaborators

  • witwave