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

Function nextDoc

lib/index.js:4797–4812  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

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…