mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
SQLUtils support addCondition & addSelectItem
This commit is contained in:
@@ -2540,7 +2540,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
}
|
||||
}
|
||||
|
||||
if (lexer.token() == Token.COMMA) {
|
||||
if (parenFlag && lexer.token() == Token.COMMA) {
|
||||
lexer.nextToken();
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -296,9 +296,11 @@ public class OracleOutputVisitor extends SQLASTOutputVisitor implements OracleAS
|
||||
|
||||
if (x.getWhere() != null) {
|
||||
println();
|
||||
incrementIndent();
|
||||
print("WHERE ");
|
||||
x.getWhere().setParent(x);
|
||||
x.getWhere().accept(this);
|
||||
decrementIndent();
|
||||
}
|
||||
|
||||
if (x.getReturning() != null) {
|
||||
@@ -770,8 +772,10 @@ public class OracleOutputVisitor extends SQLASTOutputVisitor implements OracleAS
|
||||
if (x.getWhere() != null) {
|
||||
println();
|
||||
print("WHERE ");
|
||||
incrementIndent();
|
||||
x.getWhere().setParent(x);
|
||||
x.getWhere().accept(this);
|
||||
decrementIndent();
|
||||
}
|
||||
|
||||
if (x.getReturning().size() > 0) {
|
||||
|
||||
@@ -308,8 +308,10 @@ public class PGOutputVisitor extends SQLASTOutputVisitor implements PGASTVisitor
|
||||
if (x.getWhere() != null) {
|
||||
println();
|
||||
print("WHERE ");
|
||||
incrementIndent();
|
||||
x.getWhere().setParent(x);
|
||||
x.getWhere().accept(this);
|
||||
decrementIndent();
|
||||
}
|
||||
|
||||
if (x.isReturning()) {
|
||||
@@ -426,8 +428,10 @@ public class PGOutputVisitor extends SQLASTOutputVisitor implements PGASTVisitor
|
||||
if (x.getWhere() != null) {
|
||||
println();
|
||||
print("WHERE ");
|
||||
incrementIndent();
|
||||
x.getWhere().setParent(x);
|
||||
x.getWhere().accept(this);
|
||||
decrementIndent();
|
||||
}
|
||||
|
||||
if (x.getReturning().size() > 0) {
|
||||
|
||||
+2
@@ -245,8 +245,10 @@ public class SQLServerOutputVisitor extends SQLASTOutputVisitor implements SQLSe
|
||||
if (x.getWhere() != null) {
|
||||
println();
|
||||
print("WHERE ");
|
||||
incrementIndent();
|
||||
x.getWhere().setParent(x);
|
||||
x.getWhere().accept(this);
|
||||
decrementIndent();
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user