couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject fabric commit: updated refs/heads/master to 48e31be
Date Tue, 09 Sep 2014 23:07:39 GMT
Repository: couchdb-fabric
Updated Branches:
  refs/heads/master a71701c91 -> 48e31be58


Allow clients to pass a db record to query_view

The recent updates to use couch_mrview prevented the use of a #db{}
record in concjunction with a binary GroupId because the ddoc_cache
doesn't extract the name from a db record and instead uses it as the key
directly.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/48e31be5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/48e31be5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/48e31be5

Branch: refs/heads/master
Commit: 48e31be58b1e9c613a64b5853398cb9ab9a0f6fe
Parents: a71701c
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Tue Sep 9 18:06:26 2014 -0500
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Tue Sep 9 18:06:26 2014 -0500

----------------------------------------------------------------------
 src/fabric.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/48e31be5/src/fabric.erl
----------------------------------------------------------------------
diff --git a/src/fabric.erl b/src/fabric.erl
index 3bd45b8..ea07fbe 100644
--- a/src/fabric.erl
+++ b/src/fabric.erl
@@ -282,8 +282,9 @@ query_view(DbName, DesignName, ViewName, QueryArgs) ->
 -spec query_view(dbname(), #doc{} | binary(), iodata(), callback(), any(),
         #mrargs{}) ->
     any().
-query_view(DbName, GroupId, ViewName, Callback, Acc0, QueryArgs)
+query_view(Db, GroupId, ViewName, Callback, Acc0, QueryArgs)
         when is_binary(GroupId) ->
+    DbName = dbname(Db),
     {ok, DDoc} = ddoc_cache:open(DbName, <<"_design/", GroupId/binary>>),
     query_view(DbName, DDoc, ViewName, Callback, Acc0, QueryArgs);
 query_view(DbName, DDoc, ViewName, Callback, Acc0, QueryArgs0) ->


Mime
View raw message