SQLUtils support addCondition & addSelectItem

This commit is contained in:
wenshao
2015-06-07 18:47:41 +08:00
parent f616dbfebe
commit fc4cdfacbd
15 changed files with 450 additions and 7 deletions
@@ -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) {
@@ -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;