@Override
public MySqlRollbackStatement parseRollback() {
acceptIdentifier("ROLLBACK");
MySqlRollbackStatement stmt = new MySqlRollbackStatement();
if (identifierEquals("WORK")) {
lexer.nextToken();
}
if (lexer.token() == Token.AND) {
lexer.nextToken();
if (lexer.token() == Token.NOT) {
lexer.nextToken();
acceptIdentifier(CHAIN);
stmt.setChain(Boolean.FALSE);
} else {
acceptIdentifier(CHAIN);
stmt.setChain(Boolean.TRUE);
}
}
if (lexer.token() == Token.TO) {
lexer.nextToken();
if (identifierEquals("SAVEPOINT")) {
lexer.nextToken();
}
stmt.setTo(this.exprParser.name());
}
return stmt;
}