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

Function allDocsInner

lib/index.js:5794–5830  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

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