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

Function allDocsInner

lib/index.es.js:5789–5825  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

5787 return;
5788 }
5789 function allDocsInner(data) {
5790 var doc = {
5791 id: metadata.id,
5792 key: metadata.id,
5793 value: {
5794 rev: winningRev$$1
5795 }
5796 };
5797 if (opts.include_docs) {
5798 doc.doc = data;
5799 doc.doc._rev = doc.value.rev;
5800 if (opts.conflicts) {
5801 var conflicts = collectConflicts(metadata);
5802 if (conflicts.length) {
5803 doc.doc._conflicts = conflicts;
5804 }
5805 }
5806 for (var att in doc.doc._attachments) {
5807 if (Object.prototype.hasOwnProperty.call(doc.doc._attachments, att)) {
5808 doc.doc._attachments[att].stub = true;
5809 }
5810 }
5811 }
5812 if (opts.inclusive_end === false && metadata.id === opts.endkey) {
5813 return next();
5814 } else if (deleted) {
5815 if (opts.deleted === 'ok') {
5816 doc.value.deleted = true;
5817 doc.doc = null;
5818 } else {
5819 /* istanbul ignore next */
5820 return next();
5821 }
5822 }
5823 results.push(doc);
5824 next();
5825 }
5826 if (opts.include_docs) {
5827 var seq = metadata.rev_map[winningRev$$1];
5828 stores.bySeqStore.get(formatSeq(seq), function (err, data) {

Callers 1

LevelPouchFunction · 0.70

Calls 2

collectConflictsFunction · 0.70
nextFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…