MCPcopy Create free account
hub / github.com/apache/pouchdb / abstractQuery

Function abstractQuery

lib/index-browser.es.js:9111–9128  ·  view source on GitHub ↗
(fun, opts, callback)

Source from the content-addressed store, hash-verified

9109 }
9110
9111 function abstractQuery(fun, opts, callback) {
9112 const db = this;
9113 if (typeof opts === 'function') {
9114 callback = opts;
9115 opts = {};
9116 }
9117 opts = opts ? coerceOptions(opts) : {};
9118
9119 if (typeof fun === 'function') {
9120 fun = {map : fun};
9121 }
9122
9123 const promise = Promise.resolve().then(function () {
9124 return queryPromised(db, fun, opts);
9125 });
9126 promisedCallback(promise, callback);
9127 return promise;
9128 }
9129
9130 const abstractViewCleanup = callbackify(function () {
9131 const db = this;

Callers

nothing calls this directly

Calls 3

coerceOptionsFunction · 0.70
queryPromisedFunction · 0.70
promisedCallbackFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…