Maks K
Maks K

Reputation: 3914

How to get all designs from CouchDB?

I am writing my application on CouchDB and Angular technology.

And for calling all documents I use this function:

getCommsHistory() {
        let defer = this.$q.defer();
        this.localCommsHistoryDB.allDocs({include_docs: true, group: true}).then((doc) => {
            defer.resolve(doc.rows.map(row => row.doc));
        }, () => {
            defer.reject();
        });
        return defer.promise;
    }

How can i call all designs?

Upvotes: 1

Views: 137

Answers (1)

noun
noun

Reputation: 3715

You can use startkey and endkey.

Like that:

GET /dbname/_all_docs?startkey="_design/"&endkey="_design0"&include_docs=true

Upvotes: 2

Related Questions