Closes COUCHDB-547 - Adding a View Compaction Button
Thanks to Joshua Bronson for the patch.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@831485 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/jquery.couch.js b/jquery.couch.js
index e106b17..66daefc 100644
--- a/jquery.couch.js
+++ b/jquery.couch.js
@@ -111,6 +111,16 @@
"The database could not be compacted"
);
},
+ compactView: function(groupname, options) {
+ $.extend(options, {successStatus: 202});
+ ajax({
+ type: "POST", url: this.uri + "_compact/" + groupname,
+ data: "", processData: false
+ },
+ options,
+ "The view could not be compacted"
+ );
+ },
create: function(options) {
$.extend(options, {successStatus: 201});
ajax({