nano icon indicating copy to clipboard operation
nano copied to clipboard

db.list params ?

Open ghost opened this issue 9 years ago • 2 comments

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?

ghost avatar Dec 08 '15 11:12 ghost

+1

kandebonfim avatar Nov 17 '16 20:11 kandebonfim

This repository has been merged into apache/couchdb-nano, please continue the discussion here.

carlosduclos avatar Mar 17 '17 13:03 carlosduclos