couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosduclos <...@git.apache.org>
Subject [GitHub] couchdb-nano issue #16: db.list params ?
Date Fri, 17 Mar 2017 13:29:14 GMT
GitHub user carlosduclos opened an issue:

    https://github.com/apache/couchdb-nano/issues/16

    db.list params ?

    [Original issue](https://github.com/dscape/nano/issues/302)
    
    __pjatinsight__
    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...
    ```javascript
    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:
    ```javascript
    {
           "_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?
    
    __kandebonfim__
    +1

----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message