Skip to content

Instantly share code, notes, and snippets.

@St3ph-fr
Created August 3, 2012 12:07
Show Gist options
  • Save St3ph-fr/3246991 to your computer and use it in GitHub Desktop.
Save St3ph-fr/3246991 to your computer and use it in GitHub Desktop.
Google Apps Script - Delete all the data in the scriptdb database of a google script
// #GoogleAppsScript #Gscript #GoogleSpreadsheet
//from google help page : https://developers.google.com/apps-script/scriptdb
function deleteAll() {
var db = ScriptDb.getMyDb();
while (true) {
var result = db.query({});
if (result.getSize() == 0) {
break;
}
while (result.hasNext()) {
db.remove(result.next());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment