mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for 1) tddl insert merge, 2) slf4j dependency problem
This commit is contained in:
@@ -29,7 +29,7 @@ public class SQLExprTableSource extends SQLTableSourceImpl {
|
||||
}
|
||||
|
||||
public SQLExprTableSource(SQLExpr expr){
|
||||
this.expr = expr;
|
||||
this.setExpr(expr);
|
||||
}
|
||||
|
||||
public SQLExpr getExpr() {
|
||||
|
||||
@@ -874,7 +874,7 @@ public class MySqlOutputVisitor extends SQLASTOutputVisitor implements MySqlASTV
|
||||
|
||||
print("INTO ");
|
||||
|
||||
x.getTableName().accept(this);
|
||||
x.getTableSource().accept(this);
|
||||
|
||||
if (x.getColumns().size() > 0) {
|
||||
incrementIndent();
|
||||
|
||||
+1
-1
@@ -152,7 +152,7 @@ public class MySqlParameterizedOutputVisitor extends MySqlOutputVisitor {
|
||||
|
||||
print("INTO ");
|
||||
|
||||
x.getTableName().accept(this);
|
||||
x.getTableSource().accept(this);
|
||||
|
||||
if (x.getColumns().size() > 0) {
|
||||
print(" (");
|
||||
|
||||
@@ -1627,7 +1627,7 @@ public class OracleOutputVisitor extends SQLASTOutputVisitor implements OracleAS
|
||||
public boolean visit(InsertIntoClause x) {
|
||||
print("INTO ");
|
||||
|
||||
x.getTableName().accept(this);
|
||||
x.getTableSource().accept(this);
|
||||
|
||||
if (x.getColumns().size() > 0) {
|
||||
incrementIndent();
|
||||
|
||||
@@ -329,7 +329,7 @@ public class PGOutputVisitor extends SQLASTOutputVisitor implements PGASTVisitor
|
||||
|
||||
print("INSERT INTO ");
|
||||
|
||||
x.getTableName().accept(this);
|
||||
x.getTableSource().accept(this);
|
||||
|
||||
if (x.getColumns().size() > 0) {
|
||||
incrementIndent();
|
||||
|
||||
+1
-1
@@ -124,7 +124,7 @@ public class SQLServerOutputVisitor extends SQLASTOutputVisitor implements SQLSe
|
||||
public boolean visit(SQLServerInsertStatement x) {
|
||||
print("INSERT INTO ");
|
||||
|
||||
x.getTableName().accept(this);
|
||||
x.getTableSource().accept(this);
|
||||
|
||||
if (x.getColumns().size() > 0) {
|
||||
incrementIndent();
|
||||
|
||||
@@ -39,11 +39,11 @@ public class ParameterizedOutputVisitorUtils {
|
||||
public static String parameterize(String sql, String dbType) {
|
||||
SQLStatementParser parser = SQLParserUtils.createSQLStatementParser(sql, dbType);
|
||||
List<SQLStatement> statementList = parser.parseStatementList();
|
||||
SQLStatement statemen = statementList.get(0);
|
||||
SQLStatement stmt = statementList.get(0);
|
||||
|
||||
StringBuilder out = new StringBuilder();
|
||||
SQLASTOutputVisitor visitor = createParameterizedOutputVisitor(out, dbType);
|
||||
statemen.accept(visitor);
|
||||
stmt.accept(visitor);
|
||||
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
@@ -842,7 +842,7 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter {
|
||||
public boolean visit(SQLInsertStatement x) {
|
||||
print("INSERT INTO ");
|
||||
|
||||
x.getTableName().accept(this);
|
||||
x.getTableSource().accept(this);
|
||||
|
||||
if (x.getColumns().size() > 0) {
|
||||
incrementIndent();
|
||||
|
||||
Reference in New Issue
Block a user