couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject couchdb-mango git commit: Upgrade to couch_mrview #2
Date Sun, 08 Feb 2015 15:22:46 GMT
Repository: couchdb-mango
Updated Branches:
  refs/heads/master 571c757aa -> 46d84de42


Upgrade to couch_mrview #2


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mango/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mango/commit/46d84de4
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mango/tree/46d84de4
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mango/diff/46d84de4

Branch: refs/heads/master
Commit: 46d84de428e2062c8d7c330b014fcca8be409ce4
Parents: 571c757
Author: Robert Newson <rnewson@apache.org>
Authored: Sun Feb 8 15:22:36 2015 +0000
Committer: Robert Newson <rnewson@apache.org>
Committed: Sun Feb 8 15:22:36 2015 +0000

----------------------------------------------------------------------
 src/mango_cursor_view.erl | 7 ++++---
 src/mango_json.erl        | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mango/blob/46d84de4/src/mango_cursor_view.erl
----------------------------------------------------------------------
diff --git a/src/mango_cursor_view.erl b/src/mango_cursor_view.erl
index 9e992f9..ddf1e1a 100644
--- a/src/mango_cursor_view.erl
+++ b/src/mango_cursor_view.erl
@@ -66,7 +66,8 @@ execute(#cursor{db = Db, index = Idx} = Cursor0, UserFun, UserAcc) ->
         user_acc = UserAcc
     },
     BaseArgs = #mrargs{
-        view_type = red_map,
+        view_type = map,
+        reduce = false,
         start_key = mango_idx:start_key(Idx, Cursor#cursor.ranges),
         end_key = mango_idx:end_key(Idx, Cursor#cursor.ranges),
         include_docs = true
@@ -134,9 +135,9 @@ choose_best_index(_DbName, IndexRanges) ->
     hd(lists:sort(Cmp, IndexRanges)).
 
 
-handle_message({total_and_offset, _, _} = _TO, Cursor) ->
+handle_message({meta, _}, Cursor) ->
     {ok, Cursor};
-handle_message({row, {Props}}, Cursor) ->
+handle_message({row, Props}, Cursor) ->
     case doc_member(Cursor#cursor.db, Props, Cursor#cursor.opts) of
         {ok, Doc} ->
             case mango_selector:match(Cursor#cursor.selector, Doc) of

http://git-wip-us.apache.org/repos/asf/couchdb-mango/blob/46d84de4/src/mango_json.erl
----------------------------------------------------------------------
diff --git a/src/mango_json.erl b/src/mango_json.erl
index 1a52003..2c602b6 100644
--- a/src/mango_json.erl
+++ b/src/mango_json.erl
@@ -49,7 +49,7 @@ cmp(?MAX_VAL, _) ->
 cmp(_, ?MAX_VAL) ->
     -1;
 cmp(A, B) ->
-    couch_view:cmp_json(A, B).
+    couch_ejson_compare:less_json(A, B).
 
 
 cmp_raw(?MIN_VAL, ?MIN_VAL) ->


Mime
View raw message