if (Utils.isSelectStatement(statement)) {
throw new HBqlException("executeUpdate() requires a non-SELECT statement");
}
else if (Utils.isDMLStatement(statement)) {
final ConnectionStatement stmt = ((ConnectionStatement)statement);
final ExecutionResults results = stmt.evaluatePredicateAndExecute(this.getHConnectionImpl());
return results.getCount();
}
else if (Utils.isConnectionStatemet(statement)) {
final ConnectionStatement stmt = ((ConnectionStatement)statement);
stmt.evaluatePredicateAndExecute(this.getHConnectionImpl());
return 0;
}
else if (Utils.isNonConectionStatemet(statement)) {
final NonConnectionStatement stmt = ((NonConnectionStatement)statement);
stmt.execute();
return 0;
}
else {
throw new InternalErrorException("Bad state with " + statement.getClass().getSimpleName());
}