MCPcopy
hub / github.com/apache/pouchdb / nextDoc

Function nextDoc

lib/index.es.js:4792–4807  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4790 }
4791 }
4792 function nextDoc() {
4793 var value = docs[numDone];
4794 var currentDoc = value[0];
4795 var resultsIdx = value[1];
4796
4797 if (fetchedDocs.has(id)) {
4798 updateDoc(revLimit, fetchedDocs.get(id), currentDoc, results,
4799 resultsIdx, docWritten, writeDoc, newEdits);
4800 } else {
4801 // Ensure stemming applies to new writes as well
4802 var merged = merge([], currentDoc.metadata.rev_tree[0], revLimit);
4803 currentDoc.metadata.rev_tree = merged.tree;
4804 currentDoc.stemmedRevs = merged.stemmedRevs || [];
4805 insertDoc(currentDoc, resultsIdx, docWritten);
4806 }
4807 }
4808 nextDoc();
4809 });
4810}

Callers 2

docWrittenFunction · 0.70
processDocsFunction · 0.70

Calls 4

updateDocFunction · 0.70
mergeFunction · 0.70
insertDocFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…