1
0
Fork 0

added feature for truncating a collection

This commit is contained in:
Heiko Kernbach 2014-11-07 14:49:25 +01:00
parent c13679e33d
commit 2e9a4a649a
1 changed files with 16 additions and 1 deletions

View File

@ -129,10 +129,25 @@
return returnval;
},
truncateCollection: function () {
$.ajax({
async: false,
cache: false,
type: 'PUT',
url: "/_api/collection/" + this.get("id") + "/truncate",
success: function () {
arangoHelper.arangoNotification('Collection truncated');
},
error: function () {
arangoHelper.arangoError('Collection error');
}
});
},
loadCollection: function () {
var self = this;
$.ajax({
async:false,
async: false,
cache: false,
type: 'PUT',
url: "/_api/collection/" + this.get("id") + "/load",