(start, end, inclusiveEnd, key, descending)
| 5428 | } |
| 5429 | |
| 5430 | function 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 | |
| 5459 | function idbAllDocs(opts, idb, callback) { |
| 5460 | var start = 'startkey' in opts ? opts.startkey : false; |
no outgoing calls
no test coverage detected
searching dependent graphs…