How to use the pouchdb-selector-core.rowFilter 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 pubkey / rxdb / dist / es / rx-query.js View on Github external
_proto.doesDocumentDataMatch = function doesDocumentDataMatch(docData) {
    // if doc is deleted, it cannot match
    if (docData._deleted) return false;
    var selector = this.mquery._conditions;
    docData = this.collection.schema.swapPrimaryToId(docData);
    var inMemoryFields = Object.keys(selector);
    var matches = rowFilter(docData, this.massageSelector, inMemoryFields);
    return matches;
  }
  /**
github pubkey / rxdb / src / rx-query.ts View on Github external
doesDocumentDataMatch(docData: RxDocumentType | any): boolean {
        // if doc is deleted, it cannot match
        if (docData._deleted) return false;

        const selector = this.mquery._conditions;

        docData = this.collection.schema.swapPrimaryToId(docData);
        const inMemoryFields = Object.keys(selector);

        const matches = rowFilter(
            docData,
            this.massageSelector,
            inMemoryFields
        );
        return matches;
    }