Search in sources :

Example 6 with MySqlDeleteStatement

use of com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlDeleteStatement in project Mycat-Server by MyCATApache.

the class DruidDeleteParser method statementParse.

@Override
public void statementParse(SchemaConfig schema, RouteResultset rrs, SQLStatement stmt) throws SQLNonTransientException {
    MySqlDeleteStatement delete = (MySqlDeleteStatement) stmt;
    String tableName = StringUtil.removeBackquote(delete.getTableName().getSimpleName().toUpperCase());
    ctx.addTable(tableName);
}
Also used : MySqlDeleteStatement(com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlDeleteStatement)

Aggregations

MySqlDeleteStatement (com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlDeleteStatement)6 SQLExpr (com.alibaba.druid.sql.ast.SQLExpr)2 SchemaConfig (com.actiontech.dble.config.model.SchemaConfig)1 TableConfig (com.actiontech.dble.config.model.TableConfig)1 StringPtr (com.actiontech.dble.plan.common.ptr.StringPtr)1 SchemaInfo (com.actiontech.dble.server.util.SchemaUtil.SchemaInfo)1 MysqlTest (com.alibaba.druid.sql.MysqlTest)1 SQLOrderBy (com.alibaba.druid.sql.ast.SQLOrderBy)1 SQLStatement (com.alibaba.druid.sql.ast.SQLStatement)1 SQLExprTableSource (com.alibaba.druid.sql.ast.statement.SQLExprTableSource)1 SQLJoinTableSource (com.alibaba.druid.sql.ast.statement.SQLJoinTableSource)1 SQLReplaceStatement (com.alibaba.druid.sql.ast.statement.SQLReplaceStatement)1 SQLTableSource (com.alibaba.druid.sql.ast.statement.SQLTableSource)1 MySqlExplainStatement (com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlExplainStatement)1 MySqlInsertStatement (com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlInsertStatement)1 MySqlUpdateStatement (com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlUpdateStatement)1 MySqlStatementParser (com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser)1 ParserException (com.alibaba.druid.sql.parser.ParserException)1 WallConfig (com.alibaba.druid.wall.WallConfig)1 WallContext (com.alibaba.druid.wall.WallContext)1