Nietzsche's Preposterous Moustache
    Wondering what’s next for npm?Check out our public roadmap! »

    request-kom

    0.0.5 • Public • Published

    request-kom

    License NPM Version Node Version Build Status Test Coverage Downloads Dependency Status

    NPM

    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})

    model_Model.find

    • 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)

    model_Model.remove

    • where, A query, applies the passed conditions, and returns the Query.

    update(where, options, update)

    model_Model.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)

    model_Model.count

    • where, A query, applies the passed conditions, and returns the Query.

    findOne({where, fields, populate})

    model_Model.findOne

    • 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)

    model_Model.findOneAndUpdate

    • 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})

    model_Model.findById

    • 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)

    model_Model.remove

    • id, value of _id to query by

    updateById(id, options, update)

    model_Model.findOneAndUpdate

    • id, value of _id to query by
    • options, model_Model.findOneAndUpdate options.
    • update, The doc to update.

    drop()

    drop this collection, dangerous

    Keywords

    none

    Install

    npm i request-kom

    DownloadsWeekly Downloads

    2

    Version

    0.0.5

    License

    ISC

    Unpacked Size

    8.99 kB

    Total Files

    3

    Last publish

    Collaborators

    • avatar