function Query(criteria, options) {
  if (!(this instanceof Query))
    return new Query(criteria, options);

  const proto = this.constructor.prototype;

  this.op = proto.op || undefined;

  this.options = Object.assign({}, proto.options);

  this._conditions = proto._conditions
    ? utils.clone(proto._conditions)
    : {};

  this._fields = proto._fields
    ? utils.clone(proto._fields)
    : undefined;

  this._updateDoc = proto._updateDoc
    ? utils.clone(proto._updateDoc)
    : undefined;

  this._path = proto._path || undefined;
  this._distinctDoc = proto._distinctDoc || undefined;
  this._collection = proto._collection || undefined;
  this._traceFunction = proto._traceFunction || undefined;

  if (options) {
    this.setOptions(options);
  }

  if (criteria) {
    this.find(criteria);
  }
}
Query constructor used for building queries.

#### Example:

    var query = new Query({ name: 'mquery' });
    query.setOptions({ collection: moduleCollection })
    await query.where('age').gte(21).exec();

@param {Object} [criteria] criteria for the query OR the collection instance to use
@param {Object} [options]
@api public