mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql server parser, support merge. for issue #2118
This commit is contained in:
@@ -334,19 +334,19 @@ public class SQLStatementParser extends SQLParser {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (lexer.identifierEquals("RELEASE")) {
|
||||
if (lexer.identifierEquals(FnvHash.Constants.RELEASE)) {
|
||||
SQLStatement stmt = parseReleaseSavePoint();
|
||||
statementList.add(stmt);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (lexer.identifierEquals("SAVEPOINT")) {
|
||||
if (lexer.identifierEquals(FnvHash.Constants.SAVEPOINT)) {
|
||||
SQLStatement stmt = parseSavePoint();
|
||||
statementList.add(stmt);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (lexer.identifierEquals("ROLLBACK")) {
|
||||
if (lexer.identifierEquals(FnvHash.Constants.ROLLBACK)) {
|
||||
SQLRollbackStatement stmt = parseRollback();
|
||||
statementList.add(stmt);
|
||||
|
||||
@@ -358,6 +358,13 @@ public class SQLStatementParser extends SQLParser {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (lexer.identifierEquals(FnvHash.Constants.MERGE)) {
|
||||
SQLStatement stmt = parseMerge();
|
||||
stmt.setParent(parent);
|
||||
statementList.add(stmt);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (lexer.identifierEquals(FnvHash.Constants.COMMIT)) {
|
||||
SQLStatement stmt = parseCommit();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user