summaryrefslogtreecommitdiff
path: root/share/www/script
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2010-05-04 02:01:00 +0000
committerAdam Kocoloski <kocolosk@apache.org>2010-05-04 02:01:00 +0000
commit33b3524268195a0798993690b54cead286da28fb (patch)
tree3522835f347d8671d44a9e9f966bd3fc4604699e /share/www/script
parentc2ddcc5d1c5fcbe712031df19ecc12c781d8b613 (diff)
use keysearch BIF to search ejson props. Closes COUCHDB-747
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@940708 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script')
-rw-r--r--share/www/script/test/changes.js2
-rw-r--r--share/www/script/test/erlang_views.js18
-rw-r--r--share/www/script/test/list_views.js2
3 files changed, 11 insertions, 11 deletions
diff --git a/share/www/script/test/changes.js b/share/www/script/test/changes.js
index 72ec0279..4f77771c 100644
--- a/share/www/script/test/changes.js
+++ b/share/www/script/test/changes.js
@@ -360,7 +360,7 @@ couchTests.changes = function(debug) {
filters: {
foo:
'fun({Doc}, Req) -> ' +
- ' Value = proplists:get_value(<<"value">>, Doc),' +
+ ' Value = couch_util:get_value(<<"value">>, Doc),' +
' (Value rem 2) =:= 0' +
'end.'
}
diff --git a/share/www/script/test/erlang_views.js b/share/www/script/test/erlang_views.js
index e9e0363f..5e93cb96 100644
--- a/share/www/script/test/erlang_views.js
+++ b/share/www/script/test/erlang_views.js
@@ -29,8 +29,8 @@ couchTests.erlang_views = function(debug) {
T(db.save(doc).ok);
var mfun = 'fun({Doc}) -> ' +
- ' K = proplists:get_value(<<"integer">>, Doc, null), ' +
- ' V = proplists:get_value(<<"string">>, Doc, null), ' +
+ ' K = couch_util:get_value(<<"integer">>, Doc, null), ' +
+ ' V = couch_util:get_value(<<"string">>, Doc, null), ' +
' Emit(K, V) ' +
'end.';
@@ -55,9 +55,9 @@ couchTests.erlang_views = function(debug) {
shows: {
simple:
'fun(Doc, {Req}) -> ' +
- ' {Info} = proplists:get_value(<<"info">>, Req, {[]}), ' +
- ' Purged = proplists:get_value(<<"purge_seq">>, Info, -1), ' +
- ' Verb = proplists:get_value(<<"method">>, Req, <<"not_get">>), ' +
+ ' {Info} = couch_util:get_value(<<"info">>, Req, {[]}), ' +
+ ' Purged = couch_util:get_value(<<"purge_seq">>, Info, -1), ' +
+ ' Verb = couch_util:get_value(<<"method">>, Req, <<"not_get">>), ' +
' R = list_to_binary(io_lib:format("~b - ~s", [Purged, Verb])), ' +
' {[{<<"code">>, 200}, {<<"headers">>, {[]}}, {<<"body">>, R}]} ' +
'end.'
@@ -67,7 +67,7 @@ couchTests.erlang_views = function(debug) {
'fun(Head, {Req}) -> ' +
' Send(<<"head">>), ' +
' Fun = fun({Row}, _) -> ' +
- ' Val = proplists:get_value(<<"value">>, Row, -1), ' +
+ ' Val = couch_util:get_value(<<"value">>, Row, -1), ' +
' Send(list_to_binary(integer_to_list(Val))), ' +
' {ok, nil} ' +
' end, ' +
@@ -117,10 +117,10 @@ couchTests.erlang_views = function(debug) {
T(db.bulkSave(docs).length, 250, "Saved big doc set.");
var mfun = 'fun({Doc}) -> ' +
- 'Words = proplists:get_value(<<"words">>, Doc), ' +
+ 'Words = couch_util:get_value(<<"words">>, Doc), ' +
'lists:foreach(fun({Word}) -> ' +
- 'WordString = proplists:get_value(<<"word">>, Word), ' +
- 'Count = proplists:get_value(<<"count">>, Word), ' +
+ 'WordString = couch_util:get_value(<<"word">>, Word), ' +
+ 'Count = couch_util:get_value(<<"count">>, Word), ' +
'Emit(WordString , Count) ' +
'end, Words) ' +
'end.';
diff --git a/share/www/script/test/list_views.js b/share/www/script/test/list_views.js
index 97a37e48..1cb1b2ec 100644
--- a/share/www/script/test/list_views.js
+++ b/share/www/script/test/list_views.js
@@ -178,7 +178,7 @@ couchTests.list_views = function(debug) {
'fun(Head, {Req}) -> ' +
' Send(<<"[">>), ' +
' Fun = fun({Row}, Sep) -> ' +
- ' Val = proplists:get_value(<<"key">>, Row, 23), ' +
+ ' Val = couch_util:get_value(<<"key">>, Row, 23), ' +
' Send(list_to_binary(Sep ++ integer_to_list(Val))), ' +
' {ok, ","} ' +
' end, ' +