mquery is a fluent mongodb query builder designed to run in multiple environments.
- 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
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({...})