How to use the pouchdb-utils.bulkGetShim function in pouchdb-utils

To help you get started, we’ve selected a few pouchdb-utils 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-adapter-http / src / index.js View on Github external
function onResult(batchNum) {
        return function (err, res) {
          // err is impossible because shim returns a list of errs in that case
          results[batchNum] = res.results;
          if (++numDone === numBatches) {
            callback(null, {results: flatten(results)});
          }
        };
      }

      for (var i = 0; i < numBatches; i++) {
        var subOpts = pick(opts, ['revs', 'attachments', 'binary', 'latest']);
        subOpts.docs = opts.docs.slice(i * batchSize,
          Math.min(opts.docs.length, (i + 1) * batchSize));
        bulkGetShim(self, subOpts, onResult(i));
      }
    }
github pouchdb / pouchdb / packages / node_modules / pouchdb-core / src / adapter.js View on Github external
adapterFun('bulkGet', function (opts, callback) {
  bulkGetShim(this, opts, callback);
});
github pouchdb / pouchdb / packages / node_modules / pouchdb-core / src / adapter.js View on Github external
adapterFun('bulkGet', function (opts, callback) {
  bulkGetShim(this, opts, callback);
});