(err)
| 5666 | } |
| 5667 | |
| 5668 | function complete(err) { |
| 5669 | /* istanbul ignore if */ |
| 5670 | if (err) { |
| 5671 | return nextTick(function () { |
| 5672 | callback(err); |
| 5673 | }); |
| 5674 | } |
| 5675 | txn.batch([ |
| 5676 | { |
| 5677 | prefix: stores.metaStore, |
| 5678 | type: 'put', |
| 5679 | key: UPDATE_SEQ_KEY, |
| 5680 | value: newUpdateSeq |
| 5681 | }, |
| 5682 | { |
| 5683 | prefix: stores.metaStore, |
| 5684 | type: 'put', |
| 5685 | key: DOC_COUNT_KEY, |
| 5686 | value: db._docCount + docCountDelta |
| 5687 | } |
| 5688 | ]); |
| 5689 | txn.execute(db, function (err) { |
| 5690 | /* istanbul ignore if */ |
| 5691 | if (err) { |
| 5692 | return callback(err); |
| 5693 | } |
| 5694 | db._docCount += docCountDelta; |
| 5695 | db._updateSeq = newUpdateSeq; |
| 5696 | levelChanges.notify(name); |
| 5697 | nextTick(function () { |
| 5698 | callback(null, results); |
| 5699 | }); |
| 5700 | }); |
| 5701 | } |
| 5702 | |
| 5703 | if (!docInfos.length) { |
| 5704 | return callback(null, []); |
no test coverage detected
searching dependent graphs…