diff options
author | John Christopher Anderson <jchris@apache.org> | 2009-07-04 15:47:47 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2009-07-04 15:47:47 +0000 |
commit | f6fd760c17cb5d5d49211be4b4ff92e797e83157 (patch) | |
tree | 7b46e812de759d179898d06f9757db8b1623ea46 /share/www/script/couch.js | |
parent | c25c1bd826273c9ad4d1c506bd33f34bf8502056 (diff) |
Name view index files by their function hashes for no downtime deploys. Closes COUCHDB-218
Adds ability to switch view indexes on the fly by building the index from a "staging" design doc, and then COPYing the staging doc to the production doc's id. Since indexes are referenced by view definition, the new version of the production design doc will point immediately to the index files already built in staging.
Please use and give feedback.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@791140 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/couch.js')
-rw-r--r-- | share/www/script/couch.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/share/www/script/couch.js b/share/www/script/couch.js index 8f3d96ad..c4c1ae9f 100644 --- a/share/www/script/couch.js +++ b/share/www/script/couch.js @@ -177,6 +177,19 @@ function CouchDB(name, httpHeaders) { return JSON.parse(this.last_req.responseText); } + // gets information about a design doc + this.designInfo = function(docid) { + this.last_req = this.request("GET", this.uri + docid + "/_info"); + CouchDB.maybeThrowError(this.last_req); + return JSON.parse(this.last_req.responseText); + } + + this.viewCleanup = function() { + this.last_req = this.request("POST", this.uri + "_view_cleanup"); + CouchDB.maybeThrowError(this.last_req); + return JSON.parse(this.last_req.responseText); + } + this.allDocs = function(options,keys) { if(!keys) { this.last_req = this.request("GET", this.uri + "_all_docs" + encodeOptions(options)); |