You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2018/07/24 15:37:08 UTC

[couchdb-nano] 01/01: Merge pull request #80 from adamsaeid/multi-view-queries

This is an automated email from the ASF dual-hosted git repository.

jan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-nano.git

commit bdb1cd05456f6800d67bebc45ae0001fd34e65bd
Merge: 8d71498 a57c91b
Author: Jan Lehnardt <ja...@apache.org>
AuthorDate: Tue Jul 24 17:37:05 2018 +0200

    Merge pull request #80 from adamsaeid/multi-view-queries
    
    Multi view queries tests

 lib/nano.js                       | 10 ++++++++++
 tests/fixtures/design/query.json  |  5 +++++
 tests/integration/design/query.js | 33 +++++++++++++++++++++++++++++++++
 tests/unit/design/view.js         | 16 ++++++++++++++++
 4 files changed, 64 insertions(+)

diff --cc lib/nano.js
index 6db083d,33501e6..e573888
--- a/lib/nano.js
+++ b/lib/nano.js
@@@ -625,11 -589,20 +625,21 @@@ module.exports = exports = nano = funct
            path: viewPath,
            method: 'POST',
            qs: qs1,
 -          body: body
 +          body: body,
 +          stream: meta.stream
          }, callback);
+       } else if (qs && qs.queries) {
+         body = {queries: qs.queries};
+         delete qs.queries;
+         return relax({
+           db: dbName,
+           path: viewPath,
+           method: 'POST',
+           qs: qs,
+           body: body
+         }, callback);
        } else {
 -        var req = {
 +        const req = {
            db: dbName,
            method: meta.method || 'GET',
            path: viewPath,