(results, stores, opts)
| 4997 | } |
| 4998 | |
| 4999 | function fetchAttachments(results, stores, opts) { |
| 5000 | var atts = []; |
| 5001 | results.forEach(function (row) { |
| 5002 | if (!(row.doc && row.doc._attachments)) { |
| 5003 | return; |
| 5004 | } |
| 5005 | var attNames = Object.keys(row.doc._attachments); |
| 5006 | attNames.forEach(function (attName) { |
| 5007 | var att = row.doc._attachments[attName]; |
| 5008 | if (!('data' in att)) { |
| 5009 | atts.push(att); |
| 5010 | } |
| 5011 | }); |
| 5012 | }); |
| 5013 | |
| 5014 | return Promise.all(atts.map(function (att) { |
| 5015 | return fetchAttachment(att, stores, opts); |
| 5016 | })); |
| 5017 | } |
| 5018 | |
| 5019 | function LevelPouch(opts, callback) { |
| 5020 | opts = clone(opts); |
no test coverage detected
searching dependent graphs…