* @throws HsqlException
*/
private Result processScript() throws IOException, HsqlException {
String token = tokenizer.getString();
ScriptWriterText dsw = null;
session.checkAdmin();
try {
if (tokenizer.wasValue()) {
if (tokenizer.getType() != Types.VARCHAR) {
throw Trace.error(Trace.INVALID_IDENTIFIER);
}
dsw = new ScriptWriterText(database, token, true, true, true);
dsw.writeAll();
return new Result(ResultConstants.UPDATECOUNT);
} else {
tokenizer.back();
return DatabaseScript.getScript(database, false);
}
} finally {
if (dsw != null) {
dsw.close();
}
}
}