diff options
author | John Christopher Anderson <jchris@apache.org> | 2009-01-04 01:01:33 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2009-01-04 01:01:33 +0000 |
commit | e27fb8eaa628128f0ec8f1797805e92ec39ec6cb (patch) | |
tree | 2e91e8365302bc7da520076efca194d4ccafd3eb | |
parent | 449ad331057100adc830016d08dac081077b3df2 (diff) |
Rename _temp_views to _slow_views. Any clients who were using temp views are encouraged not to use slow views, and instead transition to design documents (or running the views on the client).
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@731144 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | etc/couchdb/default.ini.tpl.in | 2 | ||||
-rw-r--r-- | etc/couchdb/local_dev.ini | 3 | ||||
-rw-r--r-- | share/www/browse/database.html | 2 | ||||
-rw-r--r-- | share/www/script/browse.js | 6 | ||||
-rw-r--r-- | share/www/script/couch.js | 2 | ||||
-rw-r--r-- | share/www/script/jquery.couch.js | 2 | ||||
-rw-r--r-- | src/couchdb/couch_httpd_view.erl | 6 | ||||
-rw-r--r-- | src/couchdb/couch_view.erl | 2 | ||||
-rw-r--r-- | src/couchdb/couch_view_group.erl | 2 |
9 files changed, 15 insertions, 12 deletions
diff --git a/etc/couchdb/default.ini.tpl.in b/etc/couchdb/default.ini.tpl.in index b06c4692..582017fd 100644 --- a/etc/couchdb/default.ini.tpl.in +++ b/etc/couchdb/default.ini.tpl.in @@ -46,7 +46,7 @@ _restart = {couch_httpd_misc_handlers, handle_restart_req} [httpd_db_handlers] _view = {couch_httpd_view, handle_view_req} -_temp_view = {couch_httpd_view, handle_temp_view_req} +_slow_view = {couch_httpd_view, handle_slow_view_req} _form = {couch_httpd_form, handle_form_req} ; The external module takes an optional argument allowing you to narrow it to a diff --git a/etc/couchdb/local_dev.ini b/etc/couchdb/local_dev.ini index 53a75a51..e6e8ca93 100644 --- a/etc/couchdb/local_dev.ini +++ b/etc/couchdb/local_dev.ini @@ -20,3 +20,6 @@ level = error [test] foo = bar + +[test] +foo = bar diff --git a/share/www/browse/database.html b/share/www/browse/database.html index f1f25e9e..6b12ed7d 100644 --- a/share/www/browse/database.html +++ b/share/www/browse/database.html @@ -117,7 +117,7 @@ specific language governing permissions and limitations under the License. <label>Select view: <select autocomplete="false"> <option value="">All documents</option> <option value="_design_docs">Design documents</option> - <option value="_temp_view">Custom query…</option> + <option value="_slow_view">Custom query…</option> </select></label> </div> <ul id="toolbar"> diff --git a/share/www/script/browse.js b/share/www/script/browse.js index ed6b7882..b91520bb 100644 --- a/share/www/script/browse.js +++ b/share/www/script/browse.js @@ -115,7 +115,7 @@ function CouchDatabasePage() { this.viewName = viewName; this.db = db; this.isDirty = false; - this.isTempView = viewName == "_temp_view"; + this.isTempView = viewName == "_slow_view"; page = this; this.addDocument = function() { @@ -223,7 +223,7 @@ function CouchDatabasePage() { } }); if (!viewName.match(/^_design\//)) { - $.each(["_all_docs", "_design_docs", "_temp_view"], function(idx, name) { + $.each(["_all_docs", "_design_docs", "_slow_view"], function(idx, name) { if (viewName == name) { select[0].options[idx].selected = true; } @@ -493,7 +493,7 @@ function CouchDatabasePage() { $("#switch select").get(0).selectedIndex = 0; db.allDocs(options); } else { - if (viewName == "_temp_view") { + if (viewName == "_slow_view") { $("#viewcode").show().removeClass("collapsed"); var mapFun = $("#viewcode_map").val(); $.cookies.set(db.name + ".map", mapFun); diff --git a/share/www/script/couch.js b/share/www/script/couch.js index d872c1f8..505d653f 100644 --- a/share/www/script/couch.js +++ b/share/www/script/couch.js @@ -123,7 +123,7 @@ function CouchDB(name, httpHeaders) { reduceFun = reduceFun.toSource ? reduceFun.toSource() : "(" + reduceFun.toString() + ")"; body.reduce = reduceFun; } - this.last_req = this.request("POST", this.uri + "_temp_view" + encodeOptions(options), { + this.last_req = this.request("POST", this.uri + "_slow_view" + encodeOptions(options), { headers: {"Content-Type": "application/json"}, body: JSON.stringify(body) }); diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js index bd77bf80..a36387a0 100644 --- a/share/www/script/jquery.couch.js +++ b/share/www/script/jquery.couch.js @@ -216,7 +216,7 @@ body.reduce = reduceFun; } $.ajax({ - type: "POST", url: this.uri + "_temp_view" + encodeOptions(options), + type: "POST", url: this.uri + "_slow_view" + encodeOptions(options), contentType: "application/json", data: toJSON(body), dataType: "json", complete: function(req) { diff --git a/src/couchdb/couch_httpd_view.erl b/src/couchdb/couch_httpd_view.erl index 35203ced..3a25bd42 100644 --- a/src/couchdb/couch_httpd_view.erl +++ b/src/couchdb/couch_httpd_view.erl @@ -13,7 +13,7 @@ -module(couch_httpd_view). -include("couch_db.hrl"). --export([handle_view_req/2,handle_temp_view_req/2]). +-export([handle_view_req/2,handle_slow_view_req/2]). -export([parse_view_query/1,parse_view_query/2,make_view_fold_fun/5,finish_view_fold/3]). @@ -57,7 +57,7 @@ handle_view_req(#httpd{method='POST',path_parts=[_,_, Id, ViewName]}=Req, Db) -> handle_view_req(Req, _Db) -> send_method_not_allowed(Req, "GET,POST,HEAD"). -handle_temp_view_req(#httpd{method='POST'}=Req, Db) -> +handle_slow_view_req(#httpd{method='POST'}=Req, Db) -> QueryArgs = parse_view_query(Req), case couch_httpd:primary_header_value(Req, "content-type") of @@ -79,7 +79,7 @@ handle_temp_view_req(#httpd{method='POST'}=Req, Db) -> output_reduce_view(Req, View, QueryArgs, Keys) end; -handle_temp_view_req(Req, _Db) -> +handle_slow_view_req(Req, _Db) -> send_method_not_allowed(Req, "POST"). output_map_view(Req, View, Db, QueryArgs, nil) -> diff --git a/src/couchdb/couch_view.erl b/src/couchdb/couch_view.erl index 665cb6f7..5065b731 100644 --- a/src/couchdb/couch_view.erl +++ b/src/couchdb/couch_view.erl @@ -227,7 +227,7 @@ handle_call({start_temp_updater, DbName, Lang, MapSrc, RedSrc}, _From, #server{r ok end, ?LOG_DEBUG("Spawning new temp update process for db ~s.", [DbName]), - {ok, NewPid} = couch_view_group:start_link({temp_view, DbName, Fd, Lang, MapSrc, RedSrc}), + {ok, NewPid} = couch_view_group:start_link({slow_view, DbName, Fd, Lang, MapSrc, RedSrc}), true = ets:insert(couch_temp_group_fd_by_db, {DbName, Fd, Count + 1}), add_to_ets(NewPid, DbName, Name), NewPid; diff --git a/src/couchdb/couch_view_group.erl b/src/couchdb/couch_view_group.erl index 84c60428..69e90633 100644 --- a/src/couchdb/couch_view_group.erl +++ b/src/couchdb/couch_view_group.erl @@ -246,7 +246,7 @@ prepare_group({view, RootDir, DbName, GroupId}, ForceReset)-> catch delete_index_file(RootDir, DbName, GroupId), Error end; -prepare_group({temp_view, DbName, Fd, Lang, MapSrc, RedSrc}, _ForceReset) -> +prepare_group({slow_view, DbName, Fd, Lang, MapSrc, RedSrc}, _ForceReset) -> case couch_db:open(DbName, []) of {ok, Db} -> View = #view{map_names=["_temp"], |