list(params) {
    return this._selectDbCollection(params.index, params.collection)
      .then(collection => this._find(collection, params))
      .then(cursor => cursor.toArray());
  }
/**
   * List all elements for the given optional query.
   *
   * When no given query, list all the documents from the collection.
   * Always resolves, with an empty list if no results.
   * @param {Object} params
   * @returns {Promise<Object>}
   */
List all elements for the given optional query.
When no given query, list all the documents from the collection.
Always resolves, with an empty list if no results.
@param {Object} params
@returns {Promise}
List all elements for the given optional query . When no given query list all the documents from the collection . Always resolves with an empty list if no results . @param { Object } params @returns { Promise }
list(params) {
    return this._selectDbCollection(params.index, params.collection)
      .then(collection => this._find(collection, params))
      .then(cursor => cursor.toArray());
  }
list ( params ) { return this . _selectDbCollection ( params . index , params . collection ) . then ( collection => this . _find ( collection , params ) ) . then ( cursor => cursor . toArray ( ) ) ; }
List all elements for the given optional query.
List all elements for the given optional query .