(keys, docStore, onBatch)
| 5409 | } |
| 5410 | |
| 5411 | function allDocsKeys(keys, docStore, onBatch) { |
| 5412 | // It's not guaranteed to be returned in right order |
| 5413 | var valuesBatch = new Array(keys.length); |
| 5414 | var count = 0; |
| 5415 | keys.forEach(function (key, index) { |
| 5416 | docStore.get(key).onsuccess = function (event) { |
| 5417 | if (event.target.result) { |
| 5418 | valuesBatch[index] = event.target.result; |
| 5419 | } else { |
| 5420 | valuesBatch[index] = {key, error: 'not_found'}; |
| 5421 | } |
| 5422 | count++; |
| 5423 | if (count === keys.length) { |
| 5424 | onBatch(keys, valuesBatch, {}); |
| 5425 | } |
| 5426 | }; |
| 5427 | }); |
| 5428 | } |
| 5429 | |
| 5430 | function createKeyRange(start, end, inclusiveEnd, key, descending) { |
| 5431 | try { |
no test coverage detected
searching dependent graphs…