You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by jc...@apache.org on 2009/01/04 02:01:34 UTC

svn commit: r731144 - in /couchdb/trunk: etc/couchdb/ share/www/browse/ share/www/script/ src/couchdb/

Author: jchris
Date: Sat Jan  3 17:01:33 2009
New Revision: 731144

URL: http://svn.apache.org/viewvc?rev=731144&view=rev
Log:
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).

Modified:
    couchdb/trunk/etc/couchdb/default.ini.tpl.in
    couchdb/trunk/etc/couchdb/local_dev.ini
    couchdb/trunk/share/www/browse/database.html
    couchdb/trunk/share/www/script/browse.js
    couchdb/trunk/share/www/script/couch.js
    couchdb/trunk/share/www/script/jquery.couch.js
    couchdb/trunk/src/couchdb/couch_httpd_view.erl
    couchdb/trunk/src/couchdb/couch_view.erl
    couchdb/trunk/src/couchdb/couch_view_group.erl

Modified: couchdb/trunk/etc/couchdb/default.ini.tpl.in
URL: http://svn.apache.org/viewvc/couchdb/trunk/etc/couchdb/default.ini.tpl.in?rev=731144&r1=731143&r2=731144&view=diff
==============================================================================
--- couchdb/trunk/etc/couchdb/default.ini.tpl.in (original)
+++ couchdb/trunk/etc/couchdb/default.ini.tpl.in Sat Jan  3 17:01:33 2009
@@ -46,7 +46,7 @@
 
 [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

Modified: couchdb/trunk/etc/couchdb/local_dev.ini
URL: http://svn.apache.org/viewvc/couchdb/trunk/etc/couchdb/local_dev.ini?rev=731144&r1=731143&r2=731144&view=diff
==============================================================================
--- couchdb/trunk/etc/couchdb/local_dev.ini (original)
+++ couchdb/trunk/etc/couchdb/local_dev.ini Sat Jan  3 17:01:33 2009
@@ -20,3 +20,6 @@
 
 [test]
 foo = bar
+
+[test]
+foo = bar

Modified: couchdb/trunk/share/www/browse/database.html
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/browse/database.html?rev=731144&r1=731143&r2=731144&view=diff
==============================================================================
--- couchdb/trunk/share/www/browse/database.html [utf-8] (original)
+++ couchdb/trunk/share/www/browse/database.html [utf-8] Sat Jan  3 17:01:33 2009
@@ -117,7 +117,7 @@
         <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">

Modified: couchdb/trunk/share/www/script/browse.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/browse.js?rev=731144&r1=731143&r2=731144&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/browse.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/browse.js [utf-8] Sat Jan  3 17:01:33 2009
@@ -115,7 +115,7 @@
   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 @@
       }
     });
     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 @@
       $("#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);

Modified: couchdb/trunk/share/www/script/couch.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/couch.js?rev=731144&r1=731143&r2=731144&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/couch.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/couch.js [utf-8] Sat Jan  3 17:01:33 2009
@@ -123,7 +123,7 @@
         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)
     });

Modified: couchdb/trunk/share/www/script/jquery.couch.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/jquery.couch.js?rev=731144&r1=731143&r2=731144&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/jquery.couch.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/jquery.couch.js [utf-8] Sat Jan  3 17:01:33 2009
@@ -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) {

Modified: couchdb/trunk/src/couchdb/couch_httpd_view.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_view.erl?rev=731144&r1=731143&r2=731144&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd_view.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd_view.erl Sat Jan  3 17:01:33 2009
@@ -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(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 @@
         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) ->

Modified: couchdb/trunk/src/couchdb/couch_view.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_view.erl?rev=731144&r1=731143&r2=731144&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_view.erl (original)
+++ couchdb/trunk/src/couchdb/couch_view.erl Sat Jan  3 17:01:33 2009
@@ -227,7 +227,7 @@
             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;

Modified: couchdb/trunk/src/couchdb/couch_view_group.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_view_group.erl?rev=731144&r1=731143&r2=731144&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_view_group.erl (original)
+++ couchdb/trunk/src/couchdb/couch_view_group.erl Sat Jan  3 17:01:33 2009
@@ -246,7 +246,7 @@
         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"],