mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add mapping support
This commit is contained in:
@@ -26,7 +26,6 @@ import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLLiteralExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLQueryExpr;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateTableStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDeleteStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropTableStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLInsertStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectStatement;
|
||||
@@ -87,7 +86,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
return new SQLSelectStatement(new MySqlSelectParser(lexer).select());
|
||||
}
|
||||
|
||||
public SQLDeleteStatement parseDeleteStatement() throws ParserException {
|
||||
public MySqlDeleteStatement parseDeleteStatement() throws ParserException {
|
||||
accept(Token.DELETE);
|
||||
|
||||
MySqlDeleteStatement deleteStatement = new MySqlDeleteStatement();
|
||||
|
||||
+9
-4
@@ -37,6 +37,7 @@ import com.alibaba.druid.sql.ast.statement.SQLSelectStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSetStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLTableSource;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUpdateSetItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUpdateStatement;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.OracleHint;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.clause.OracleErrorLoggingClause;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.clause.OracleParameter;
|
||||
@@ -161,7 +162,7 @@ public class OracleStatementParser extends SQLStatementParser {
|
||||
}
|
||||
|
||||
if (lexer.token() == (Token.UPDATE)) {
|
||||
statementList.add(new OracleUpdateParser(this.lexer).parseUpdate());
|
||||
statementList.add(parseUpdateStatement());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -176,7 +177,7 @@ public class OracleStatementParser extends SQLStatementParser {
|
||||
}
|
||||
|
||||
if (lexer.token() == (Token.DELETE)) {
|
||||
statementList.add(parseDelete());
|
||||
statementList.add(parseDeleteStatement());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -368,7 +369,7 @@ public class OracleStatementParser extends SQLStatementParser {
|
||||
stmt.setImmediate(Boolean.FALSE);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1413,7 +1414,7 @@ public class OracleStatementParser extends SQLStatementParser {
|
||||
return stmt;
|
||||
}
|
||||
|
||||
public OracleDeleteStatement parseDelete() throws ParserException {
|
||||
public OracleDeleteStatement parseDeleteStatement() throws ParserException {
|
||||
accept(Token.DELETE);
|
||||
|
||||
OracleDeleteStatement deleteStatement = new OracleDeleteStatement();
|
||||
@@ -1595,4 +1596,8 @@ public class OracleStatementParser extends SQLStatementParser {
|
||||
|
||||
return stmt;
|
||||
}
|
||||
|
||||
public SQLUpdateStatement parseUpdateStatement() throws ParserException {
|
||||
return new OracleUpdateParser(this.lexer).parseUpdateStatement();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class OracleUpdateParser extends SQLStatementParser {
|
||||
super(lexer);
|
||||
}
|
||||
|
||||
public OracleUpdateStatement parseUpdate() throws ParserException {
|
||||
public OracleUpdateStatement parseUpdateStatement() throws ParserException {
|
||||
accept(Token.UPDATE);
|
||||
|
||||
OracleUpdateStatement update = new OracleUpdateStatement();
|
||||
|
||||
Reference in New Issue
Block a user