sort(sort) {
    if (!(sort instanceof Object) || Object.getPrototypeOf(sort) != Object.prototype)
      throw new Error('sort must be an object.');

    return this._addOrder(sort);
  }
/**
   * Sets the sort of the query and discard all existing paramaters
   * @param {Object} sort The new sort of the query
   * @return {query.Query<T>} The resulting Query
   *
   * @see http://docs.mongodb.org/manual/reference/method/cursor.sort/
   */
Sets the sort of the query and discard all existing paramaters
@param {Object} sort The new sort of the query
@return {query.Query} The resulting Query


Sets the sort of the query and discard all existing paramaters @param { Object } sort The new sort of the query @return { query . Query } The resulting Query
sort(sort) {
    if (!(sort instanceof Object) || Object.getPrototypeOf(sort) != Object.prototype)
      throw new Error('sort must be an object.');
    return this._addOrder(sort);
  }
sort ( sort ) { if ( ! ( sort instanceof Object ) || Object . getPrototypeOf ( sort ) != Object . prototype ) throw new Error ( 'sort must be an object.' ) ; return this . _addOrder ( sort ) ; }
Sets the sort of the query and discard all existing paramaters
 @param {Object} sort The new sort of the query
 @return {query.Query<T>} The resulting Query
Sets the sort of the query and discard all existing paramaters @param { Object } sort The new sort of the query @return { query . Query<T > } The resulting Query