nano
nano copied to clipboard
db.list params ?
Apologies if this is a newbie mistake.
Trying to get back some documents without having to use a view. I have different documents it the db.
I want to extract the 'schedule' documents...
db.list({type:'schedule'},function(err, body) {
if (!err) {
console.log("And got..");
body.rows.forEach(function(doc) {
console.log(doc);
});
res.json(body.rows);
}
});
The 'schedule' documents are like this:
{
"_id": "emailjob1",
"_rev": "3-94b1eb8bff5bc64c224ac0a86b4dc2e0",
"shortname": "EmailJob1",
"displayname": "Daily at 11am (weekdays only)",
"type": "schedule",
"chronstring": "00 30 11 * * 1-5"
}
But I'm just getting what looks like a random selection of documents back... Do I need to specify the params in some other way?
+1
This repository has been merged into apache/couchdb-nano, please continue the discussion here.