}
return new TransactionCommand(session, type);
}
private TransactionCommand parseRollback() {
TransactionCommand command;
if (readIf("TRANSACTION")) {
command = new TransactionCommand(session, CommandInterface.ROLLBACK_TRANSACTION);
command.setTransactionName(readUniqueIdentifier());
return command;
}
if (readIf("TO")) {
read("SAVEPOINT");
command = new TransactionCommand(session, CommandInterface.ROLLBACK_TO_SAVEPOINT);
command.setSavepointName(readUniqueIdentifier());
} else {
readIf("WORK");
command = new TransactionCommand(session, CommandInterface.ROLLBACK);
}
return command;
}