Created
August 3, 2012 12:07
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// #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