How to use the pouchdb-selector-core.massageSelector function in pouchdb-selector-core

To help you get started, we’ve selected a few pouchdb-selector-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pouchdb / pouchdb / packages / node_modules / pouchdb-find / src / adapters / local / find / index.js View on Github external
function find(db, requestDef, explain) {
  if (requestDef.selector) {
    requestDef.selector = massageSelector(requestDef.selector);
  }

  if (requestDef.sort) {
    requestDef.sort = massageSort(requestDef.sort);
  }

  if (requestDef.use_index) {
    requestDef.use_index = massageUseIndex(requestDef.use_index);
  }

  validateFindRequest(requestDef);

  return getIndexes(db).then(function (getIndexesRes) {

    db.constructor.emit('debug', ['find', 'planning query', requestDef]);
    var queryPlan = planQuery(requestDef, getIndexesRes.indexes);
github pubkey / rxdb / dist / es / rx-query.js View on Github external
get: function get() {
      if (!this._massageSelector) {
        var selector = this.mquery._conditions;
        this._massageSelector = massageSelector(selector);
      }

      return this._massageSelector;
    }
  }]);
github pubkey / rxdb / src / rx-query.ts View on Github external
get massageSelector() {
        if (!this._massageSelector) {
            const selector = this.mquery._conditions;
            this._massageSelector = massageSelector(selector);
        }
        return this._massageSelector;
    }
    public id: number = newQueryID();