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

Function nextDoc

lib/index-browser.js:4652–4667  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4650 }
4651 }
4652 function nextDoc() {
4653 var value = docs[numDone];
4654 var currentDoc = value[0];
4655 var resultsIdx = value[1];
4656
4657 if (fetchedDocs.has(id)) {
4658 updateDoc(revLimit, fetchedDocs.get(id), currentDoc, results,
4659 resultsIdx, docWritten, writeDoc, newEdits);
4660 } else {
4661 // Ensure stemming applies to new writes as well
4662 var merged = merge([], currentDoc.metadata.rev_tree[0], revLimit);
4663 currentDoc.metadata.rev_tree = merged.tree;
4664 currentDoc.stemmedRevs = merged.stemmedRevs || [];
4665 insertDoc(currentDoc, resultsIdx, docWritten);
4666 }
4667 }
4668 nextDoc();
4669 });
4670}

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…