You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2014/02/28 20:38:13 UTC

couch-mrview commit: updated refs/heads/1993-bigcouch-couch-mrview to 9410bc6

Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/1993-bigcouch-couch-mrview 5a0d7da8f -> 9410bc6b3


Allow couch_mrview:get_info to take a DDoc ID

The primary motivation for this update is that it's a natural fit with
the fabric_rpc:with_db function and avoids duplicating a lot of
unnecessary code.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/9410bc6b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/9410bc6b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/9410bc6b

Branch: refs/heads/1993-bigcouch-couch-mrview
Commit: 9410bc6b3cda055ac947bd0c8ad816984c9ea6e5
Parents: 5a0d7da
Author: Russell Branca <ch...@apache.org>
Authored: Fri Feb 28 11:34:27 2014 -0800
Committer: Russell Branca <ch...@apache.org>
Committed: Fri Feb 28 11:34:27 2014 -0800

----------------------------------------------------------------------
 src/couch_mrview.erl | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/9410bc6b/src/couch_mrview.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview.erl b/src/couch_mrview.erl
index 29b86d7..d5faca3 100644
--- a/src/couch_mrview.erl
+++ b/src/couch_mrview.erl
@@ -127,6 +127,10 @@ query_view(Db, {Type, View, Ref}, Args, Callback, Acc) ->
     end.
 
 
+get_info(Db, DDocId) when is_binary(DDocId) ->
+    DbName = mem3:dbname(Db#db.name),
+    {ok, DDoc} = ddoc_cache:open(DbName, DDocId),
+    get_info(Db, DDoc);
 get_info(Db, DDoc) ->
     {ok, Pid} = couch_index_server:get_index(couch_mrview_index, Db, DDoc),
     couch_index:get_info(Pid).