I am very new to CouchDB. Missing SQL already.
Anyways, I need to create a view that emits a few attributes of my documents along with all the revision IDs.
Something like this
function(doc) {
if (doc.type == 'template') {
emit(doc.owner, {_id: doc._id, _rev: doc._rev, owner: doc.owner, meta: doc.meta, key: doc.key, revisions_ids: What goes here?});
}
}
But how do I tell it to include all the revisions?
I know I can call http://localhost:5984/main/94c4db9eb51f757ceab86e4a9b00cddf
for each document (from my app), but that really does not scale well.
Is there a batch way to fetch revision info?
Any help would be appreciated!!