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

Function abstractQuery

lib/index.js:9153–9170  ·  view source on GitHub ↗
(fun, opts, callback)

Source from the content-addressed store, hash-verified

9151 }
9152
9153 function abstractQuery(fun, opts, callback) {
9154 const db = this;
9155 if (typeof opts === 'function') {
9156 callback = opts;
9157 opts = {};
9158 }
9159 opts = opts ? coerceOptions(opts) : {};
9160
9161 if (typeof fun === 'function') {
9162 fun = {map : fun};
9163 }
9164
9165 const promise = Promise.resolve().then(function () {
9166 return queryPromised(db, fun, opts);
9167 });
9168 promisedCallback(promise, callback);
9169 return promise;
9170 }
9171
9172 const abstractViewCleanup = callbackify(function () {
9173 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…