Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* Module dependencies.
*/
//var mquery = require('./querybuilder');
var mquery = require('mquery');
var util = require('util');
var events = require('events');
var utils = require('./utils');
var Promise = require('./promise');
var helpers = require('./queryhelpers');
var Types = require('./schema/index');
var Document = require('./document');
var QueryStream = require('./querystream');
mquery.Collection = require('./mod/MQueryLibCollectionNode');
/**
* Query constructor used for building queries.
*
* ####Example:
*
* var query = new Query();
* query.setOptions({ lean : true });
* query.collection(model.collection);
* query.where('age').gte(21).exec(callback);
*
* @param {Object} [options]
* @param {Object} [model]
* @param {Object} [conditions]
* @param {Object} [collection] Docooment collection