}
public Result executeDirectStatement(Result cmd) {
String sql = cmd.getMainString();
HsqlArrayList list;
int maxRows = cmd.getUpdateCount();
if (maxRows == -1) {
sessionContext.currentMaxRows = 0;
} else if (sessionMaxRows == 0) {
sessionContext.currentMaxRows = maxRows;
} else {
sessionContext.currentMaxRows = sessionMaxRows;
sessionMaxRows = 0;
}
try {
list = parser.compileStatements(sql, cmd);
} catch (Exception e) {
return Result.newErrorResult(e);
}
Result result = null;
for (int i = 0; i < list.size(); i++) {
Statement cs = (Statement) list.get(i);
cs.setGeneratedColumnInfo(cmd.getGeneratedResultType(),
cmd.getGeneratedResultMetaData());
result = executeCompiledStatement(cs, ValuePool.emptyObjectArray);