request-kom
v0.0.5
Published
[![License][license-img]][license-url] [![NPM Version][npm-img]][npm-url] [![Node Version][node-image]][node-url] [![Build Status][travis-img]][travis-url] [![Test Coverage][coveralls-img]][coveralls-url] [![Downloads][downloads-image]][downloads-url] [![
Downloads
7
Readme
request-kom
Api docs
constructor(option)
Reassign the default request option. the default option is timeout 3000 and json true.
go(option)
Use the option to request.
create([array[object]|object])
model_Model.insertMany Shortcut for saving one or more documents to the database.
find({where, fields, skip, limit, sort, populate})
- where, A query, applies the passed conditions, and returns the Query.
- fields, Specifies which document fields to include or exclude (also known as the query "projection").
- skip, Specifies the number of documents to skip.
- limit, Specifies the maximum number of documents the query will return.
- sort, Sets the sort order.
- populate, Specifies paths which should be populated with other documents.
remove(where)
- where, A query, applies the passed conditions, and returns the Query.
update(where, options, update)
- where, A query, applies the passed conditions, and returns the Query.
- options, model_Model.update options.
- update, The doc to update.
page({where, fields, page, size, sort, populate})
- where, A query, applies the passed conditions, and returns the Query.
- fields, Specifies which document fields to include or exclude (also known as the query "projection").
- page, Specifies the number of documents to skip.
- size, Specifies the maximum number of documents the query will return.
- sort, Sets the sort order.
- populate, Specifies paths which should be populated with other documents.
count(where)
- where, A query, applies the passed conditions, and returns the Query.
findOne({where, fields, populate})
- where, A query, applies the passed conditions, and returns the Query.
- fields, Specifies which document fields to include or exclude (also known as the query "projection").
- populate, Specifies paths which should be populated with other documents.
findOneAndUpdate(where, options, update)
- where, A query, applies the passed conditions, and returns the Query.
- options, model_Model.findOneAndUpdate options.
- update, The doc to update.
findById(id, {fields, populate})
- id, value of _id to query by
- fields, Specifies which document fields to include or exclude (also known as the query "projection").
- populate, Specifies paths which should be populated with other documents.
removeById(id)
- id, value of _id to query by
updateById(id, options, update)
- id, value of _id to query by
- options, model_Model.findOneAndUpdate options.
- update, The doc to update.
drop()
drop this collection, dangerous