Skip to content
mongoosejsPublic

About

Expressive MongoDB query builder

Topics

Resources

Security policy

Stars

486 stars

Watchers

15 watching

Forks

Latest commit

 

History

459 Commits

Folders and files

Repository files navigation

mquery

mquery is a fluent mongodb query builder designed to run in multiple environments.

Build Status NPM version

npm

Features

  • fluent query builder api
  • custom base query support
  • MongoDB 2.4 geoJSON support
  • method + option combinations validation
  • node.js driver compatibility
  • environment detection
  • debug support
  • separated collection implementations for maximum flexibility

Use

const mongo = require('mongodb');

const client = new mongo.MongoClient(uri);
await client.connect();
// get a collection
const collection = client.collection('artists');

// pass it to the constructor
await mquery(collection).find({...});

// or pass it to the collection method
const docs = await mquery().find({...})