couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [1/5] couch commit: updated refs/heads/1994-merge-rcouch to 3f51842
Date Thu, 13 Feb 2014 03:25:52 GMT
Updated Branches:
  refs/heads/1994-merge-rcouch f07bbfcc0 -> 3f5184216


add supports of view changes in the _changes API

Now when the option `seq_indexed=true` is set in the design doc, the
view filter in _changes will use it to retrieve the results. Compared to
the current way, using a view index will be faster to retrieve changes.
It also gives the possibility to filter changes by key or get changes in
a key range. All the view options can be used.

Note 1: if someone is trying to filter a changes with view options when
the views are not indexed by sequence, a 400 error will be returned.
Note 2: The changes will only be returned when the view is updated if
seq_indexed=true


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

Branch: refs/heads/1994-merge-rcouch
Commit: e5856d47067550365e5ae54ef4342c36b7dfbaac
Parents: f07bbfc
Author: benoitc <bchesneau@gmail.com>
Authored: Fri Feb 7 15:38:34 2014 +0100
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Wed Feb 12 21:23:45 2014 -0600

----------------------------------------------------------------------
 src/couch_util.erl | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/e5856d47/src/couch_util.erl
----------------------------------------------------------------------
diff --git a/src/couch_util.erl b/src/couch_util.erl
index 40401e2..2a3bba7 100644
--- a/src/couch_util.erl
+++ b/src/couch_util.erl
@@ -32,6 +32,7 @@
 -export([with_db/2]).
 -export([rfc1123_date/0, rfc1123_date/1]).
 -export([find_in_binary/2]).
+-export([to_atom/1]).
 
 -include("couch_db.hrl").
 
@@ -352,6 +353,12 @@ to_list(V) when is_atom(V) ->
 to_list(V) ->
     lists:flatten(io_lib:format("~p", [V])).
 
+
+to_atom(V) when is_binary(V) ->
+    list_to_atom(binary_to_list(V));
+to_atom(V) when is_list(V) ->
+    list_to_atom(V).
+
 url_encode(Bin) when is_binary(Bin) ->
     url_encode(binary_to_list(Bin));
 url_encode([H|T]) ->


Mime
View raw message