mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser.
This commit is contained in:
@@ -43,9 +43,6 @@ public class DB2OutputVisitor extends SQLASTOutputVisitor implements DB2ASTVisit
|
||||
if (x.isForReadOnly()) {
|
||||
println();
|
||||
print0(ucase ? "FOR READ ONLY" : "for read only");
|
||||
} else if (x.isForUpdate()) {
|
||||
println();
|
||||
print0(ucase ? "FOR UPDATE" : "for update");
|
||||
}
|
||||
|
||||
if (x.getIsolation() != null) {
|
||||
|
||||
+1
-1
@@ -1695,7 +1695,7 @@ public class OracleStatementParser extends SQLStatementParser {
|
||||
if (lexer.token() == Token.ALL) {
|
||||
lexer.nextToken();
|
||||
stmt.setOption(OracleMultiInsertStatement.Option.ALL);
|
||||
} else if (lexer.token() == Token.FIRST) {
|
||||
} else if (lexer.token() == Token.FIRST || identifierEquals("FIRST")) {
|
||||
lexer.nextToken();
|
||||
stmt.setOption(OracleMultiInsertStatement.Option.FIRST);
|
||||
}
|
||||
|
||||
@@ -144,8 +144,11 @@ public class OracleOutputVisitor extends SQLASTOutputVisitor implements OracleAS
|
||||
}
|
||||
|
||||
public boolean visit(OracleDbLinkExpr x) {
|
||||
x.getExpr().accept(this);
|
||||
print('@');
|
||||
SQLExpr expr = x.getExpr();
|
||||
if (expr != null) {
|
||||
expr.accept(this);
|
||||
print('@');
|
||||
}
|
||||
print0(x.getDbLink());
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user