MCPcopy Index your code
hub / github.com/apache/pouchdb / createKeyRange

Function createKeyRange

lib/index-browser.js:5430–5457  ·  view source on GitHub ↗
(start, end, inclusiveEnd, key, descending)

Source from the content-addressed store, hash-verified

5428}
5429
5430function createKeyRange(start, end, inclusiveEnd, key, descending) {
5431 try {
5432 if (start && end) {
5433 if (descending) {
5434 return IDBKeyRange.bound(end, start, !inclusiveEnd, false);
5435 } else {
5436 return IDBKeyRange.bound(start, end, false, !inclusiveEnd);
5437 }
5438 } else if (start) {
5439 if (descending) {
5440 return IDBKeyRange.upperBound(start);
5441 } else {
5442 return IDBKeyRange.lowerBound(start);
5443 }
5444 } else if (end) {
5445 if (descending) {
5446 return IDBKeyRange.lowerBound(end, !inclusiveEnd);
5447 } else {
5448 return IDBKeyRange.upperBound(end, !inclusiveEnd);
5449 }
5450 } else if (key) {
5451 return IDBKeyRange.only(key);
5452 }
5453 } catch (e) {
5454 return {error: e};
5455 }
5456 return null;
5457}
5458
5459function idbAllDocs(opts, idb, callback) {
5460 var start = 'startkey' in opts ? opts.startkey : false;

Callers 1

idbAllDocsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…