mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved WallFilter support. issue #1923
This commit is contained in:
@@ -19,7 +19,7 @@ import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLAlterDatabaseStatement extends SQLStatementImpl {
|
||||
public class SQLAlterDatabaseStatement extends SQLStatementImpl implements SQLAlterStatement {
|
||||
|
||||
private SQLName name;
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLStatement;
|
||||
|
||||
public interface SQLAlterStatement extends SQLStatement {
|
||||
}
|
||||
@@ -28,7 +28,7 @@ import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLPropertyExpr;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLAlterTableStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLAlterTableStatement extends SQLStatementImpl implements SQLDDLStatement, SQLAlterStatement {
|
||||
|
||||
private SQLExprTableSource tableSource;
|
||||
private List<SQLAlterTableItem> items = new ArrayList<SQLAlterTableItem>();
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLAlterViewRenameStatement extends SQLStatementImpl {
|
||||
public class SQLAlterViewRenameStatement extends SQLStatementImpl implements SQLAlterStatement {
|
||||
|
||||
private SQLName name;
|
||||
private SQLName to;
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLCreateDatabaseStatement extends SQLStatementImpl {
|
||||
public class SQLCreateDatabaseStatement extends SQLStatementImpl implements SQLCreateStatement {
|
||||
|
||||
private SQLName name;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
/**
|
||||
* Created by wenshao on 23/05/2017.
|
||||
*/
|
||||
public class SQLCreateFunctionStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLCreateFunctionStatement extends SQLStatementImpl implements SQLCreateStatement {
|
||||
private SQLName definer;
|
||||
|
||||
private boolean create = true;
|
||||
|
||||
@@ -25,7 +25,7 @@ import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLPropertyExpr;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLCreateIndexStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLCreateIndexStatement extends SQLStatementImpl implements SQLCreateStatement {
|
||||
|
||||
private SQLName name;
|
||||
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import java.util.List;
|
||||
/**
|
||||
* Created by wenshao on 30/06/2017.
|
||||
*/
|
||||
public class SQLCreateMaterializedViewStatement extends SQLStatementImpl implements OracleSegmentAttributes {
|
||||
public class SQLCreateMaterializedViewStatement extends SQLStatementImpl implements OracleSegmentAttributes, SQLCreateStatement {
|
||||
private SQLName name;
|
||||
private List<SQLName> columns = new ArrayList<SQLName>();
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.alibaba.druid.sql.ast.SQLStatement;
|
||||
import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLCreateProcedureStatement extends SQLStatementImpl {
|
||||
public class SQLCreateProcedureStatement extends SQLStatementImpl implements SQLCreateStatement {
|
||||
|
||||
private SQLName definer;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
/**
|
||||
* Created by wenshao on 16/9/14.
|
||||
*/
|
||||
public class SQLCreateSequenceStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLCreateSequenceStatement extends SQLStatementImpl implements SQLCreateStatement {
|
||||
private SQLName name;
|
||||
|
||||
private SQLExpr startWith;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLStatement;
|
||||
|
||||
public interface SQLCreateStatement extends SQLDDLStatement {
|
||||
}
|
||||
@@ -31,7 +31,7 @@ import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
import com.alibaba.druid.util.ListDG;
|
||||
import com.alibaba.druid.util.lang.Consumer;
|
||||
|
||||
public class SQLCreateTableStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLCreateTableStatement extends SQLStatementImpl implements SQLDDLStatement, SQLCreateStatement {
|
||||
|
||||
protected boolean ifNotExiists = false;
|
||||
protected Type type;
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.alibaba.druid.sql.ast.SQLStatement;
|
||||
import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLCreateTriggerStatement extends SQLStatementImpl {
|
||||
public class SQLCreateTriggerStatement extends SQLStatementImpl implements SQLCreateStatement {
|
||||
|
||||
private SQLName name;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import com.alibaba.druid.sql.ast.expr.SQLLiteralExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLPropertyExpr;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLCreateViewStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLCreateViewStatement extends SQLStatementImpl implements SQLCreateStatement {
|
||||
|
||||
private boolean orReplace = false;
|
||||
private boolean force = false;
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLDropDatabaseStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLDropDatabaseStatement extends SQLStatementImpl implements SQLDropStatement {
|
||||
|
||||
private SQLExpr database;
|
||||
private boolean ifExists;
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLDropFunctionStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLDropFunctionStatement extends SQLStatementImpl implements SQLDropStatement {
|
||||
|
||||
private SQLName name;
|
||||
private boolean ifExists;
|
||||
|
||||
@@ -20,7 +20,7 @@ import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLDropIndexStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLDropIndexStatement extends SQLStatementImpl implements SQLDropStatement {
|
||||
|
||||
private SQLName indexName;
|
||||
private SQLExprTableSource tableName;
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLDropProcedureStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLDropProcedureStatement extends SQLStatementImpl implements SQLDropStatement {
|
||||
|
||||
private SQLName name;
|
||||
private boolean ifExists;
|
||||
|
||||
@@ -20,7 +20,7 @@ import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLPropertyExpr;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLDropSequenceStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLDropSequenceStatement extends SQLStatementImpl implements SQLDropStatement {
|
||||
|
||||
private SQLName name;
|
||||
private boolean ifExists;
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
public interface SQLDropStatement extends SQLDDLStatement {
|
||||
}
|
||||
@@ -19,7 +19,7 @@ import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLDropTableSpaceStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLDropTableSpaceStatement extends SQLStatementImpl implements SQLDropStatement {
|
||||
|
||||
private SQLName name;
|
||||
private boolean ifExists;
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLPropertyExpr;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLDropTableStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLDropTableStatement extends SQLStatementImpl implements SQLDropStatement {
|
||||
private List<SQLCommentHint> hints;
|
||||
|
||||
protected List<SQLExprTableSource> tableSources = new ArrayList<SQLExprTableSource>();
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLDropTriggerStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLDropTriggerStatement extends SQLStatementImpl implements SQLDropStatement {
|
||||
|
||||
private SQLName name;
|
||||
private boolean ifExists;
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLDropUserStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLDropUserStatement extends SQLStatementImpl implements SQLDropStatement {
|
||||
|
||||
private List<SQLExpr> users = new ArrayList<SQLExpr>(2);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLDropViewStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
public class SQLDropViewStatement extends SQLStatementImpl implements SQLDropStatement {
|
||||
|
||||
protected List<SQLExprTableSource> tableSources = new ArrayList<SQLExprTableSource>();
|
||||
|
||||
|
||||
+2
-1
@@ -19,9 +19,10 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterStatement;
|
||||
import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;
|
||||
|
||||
public class MySqlAlterUserStatement extends MySqlStatementImpl {
|
||||
public class MySqlAlterUserStatement extends MySqlStatementImpl implements SQLAlterStatement {
|
||||
|
||||
private final List<SQLExpr> users = new ArrayList<SQLExpr>();
|
||||
|
||||
|
||||
+2
-1
@@ -19,10 +19,11 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateStatement;
|
||||
import com.alibaba.druid.sql.dialect.mysql.ast.MySqlObjectImpl;
|
||||
import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;
|
||||
|
||||
public class MySqlCreateUserStatement extends MySqlStatementImpl {
|
||||
public class MySqlCreateUserStatement extends MySqlStatementImpl implements SQLCreateStatement {
|
||||
|
||||
private List<UserSpecification> users = new ArrayList<UserSpecification>(2);
|
||||
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
package com.alibaba.druid.sql.dialect.odps.ast;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLExprTableSource;
|
||||
import com.alibaba.druid.sql.dialect.odps.visitor.OdpsASTVisitor;
|
||||
|
||||
public class OdpsAddStatisticStatement extends OdpsStatementImpl {
|
||||
public class OdpsAddStatisticStatement extends OdpsStatementImpl implements SQLAlterStatement {
|
||||
|
||||
private SQLExprTableSource table;
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import com.alibaba.druid.sql.ast.SQLObject;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.OracleSQLObjectImpl;
|
||||
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
|
||||
|
||||
public class OracleAlterIndexStatement extends OracleStatementImpl {
|
||||
public class OracleAlterIndexStatement extends OracleStatementImpl implements OracleAlterStatement {
|
||||
|
||||
private SQLName name;
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ package com.alibaba.druid.sql.dialect.oracle.ast.stmt;
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
|
||||
|
||||
public class OracleAlterProcedureStatement extends OracleStatementImpl {
|
||||
public class OracleAlterProcedureStatement extends OracleStatementImpl implements OracleAlterStatement {
|
||||
|
||||
private SQLExpr name;
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAssignItem;
|
||||
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
|
||||
|
||||
public class OracleAlterSessionStatement extends OracleStatementImpl {
|
||||
public class OracleAlterSessionStatement extends OracleStatementImpl implements OracleAlterStatement {
|
||||
|
||||
private List<SQLAssignItem> items = new ArrayList<SQLAssignItem>();
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.alibaba.druid.sql.dialect.oracle.ast.stmt;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterStatement;
|
||||
|
||||
public interface OracleAlterStatement extends SQLAlterStatement, OracleStatement {
|
||||
}
|
||||
+1
-1
@@ -18,7 +18,7 @@ package com.alibaba.druid.sql.dialect.oracle.ast.stmt;
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
|
||||
|
||||
public class OracleAlterSynonymStatement extends OracleStatementImpl {
|
||||
public class OracleAlterSynonymStatement extends OracleStatementImpl implements OracleAlterStatement {
|
||||
|
||||
private SQLName name;
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ package com.alibaba.druid.sql.dialect.oracle.ast.stmt;
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
|
||||
|
||||
public class OracleAlterTablespaceStatement extends OracleStatementImpl {
|
||||
public class OracleAlterTablespaceStatement extends OracleStatementImpl implements OracleAlterStatement {
|
||||
|
||||
private SQLName name;
|
||||
private OracleAlterTablespaceItem item;
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ package com.alibaba.druid.sql.dialect.oracle.ast.stmt;
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
|
||||
|
||||
public class OracleAlterTriggerStatement extends OracleStatementImpl {
|
||||
public class OracleAlterTriggerStatement extends OracleStatementImpl implements OracleAlterStatement {
|
||||
|
||||
private SQLName name;
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ package com.alibaba.druid.sql.dialect.oracle.ast.stmt;
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
|
||||
|
||||
public class OracleAlterViewStatement extends OracleStatementImpl {
|
||||
public class OracleAlterViewStatement extends OracleStatementImpl implements OracleAlterStatement {
|
||||
|
||||
private SQLName name;
|
||||
|
||||
|
||||
+2
-1
@@ -17,9 +17,10 @@ package com.alibaba.druid.sql.dialect.oracle.ast.stmt;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateStatement;
|
||||
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
|
||||
|
||||
public class OracleCreateDatabaseDbLinkStatement extends OracleStatementImpl {
|
||||
public class OracleCreateDatabaseDbLinkStatement extends OracleStatementImpl implements SQLCreateStatement {
|
||||
|
||||
private boolean shared;
|
||||
private boolean _public;
|
||||
|
||||
+2
-1
@@ -17,6 +17,7 @@ package com.alibaba.druid.sql.dialect.oracle.ast.stmt;
|
||||
|
||||
import com.alibaba.druid.sql.ast.*;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateIndexStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateStatement;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.OracleSegmentAttributes;
|
||||
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
@@ -25,7 +26,7 @@ import com.alibaba.druid.util.JdbcConstants;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class OracleCreateIndexStatement extends SQLCreateIndexStatement implements OracleDDLStatement, OracleSegmentAttributes {
|
||||
public class OracleCreateIndexStatement extends SQLCreateIndexStatement implements OracleDDLStatement, OracleSegmentAttributes, SQLCreateStatement {
|
||||
|
||||
private boolean online = false;
|
||||
|
||||
|
||||
+2
-1
@@ -17,6 +17,7 @@ package com.alibaba.druid.sql.dialect.oracle.ast.stmt;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateStatement;
|
||||
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
|
||||
import com.alibaba.druid.util.JdbcConstants;
|
||||
import org.apache.ibatis.jdbc.SQL;
|
||||
@@ -27,7 +28,7 @@ import java.util.List;
|
||||
/**
|
||||
* Created by wenshao on 23/05/2017.
|
||||
*/
|
||||
public class OracleCreatePackageStatement extends OracleStatementImpl {
|
||||
public class OracleCreatePackageStatement extends OracleStatementImpl implements SQLCreateStatement {
|
||||
private boolean orReplace;
|
||||
private SQLName name;
|
||||
|
||||
|
||||
+2
-1
@@ -1,9 +1,10 @@
|
||||
package com.alibaba.druid.sql.dialect.oracle.ast.stmt;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateStatement;
|
||||
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
|
||||
|
||||
public class OracleCreateSynonymStatement extends OracleStatementImpl {
|
||||
public class OracleCreateSynonymStatement extends OracleStatementImpl implements SQLCreateStatement {
|
||||
private boolean orReplace;
|
||||
private SQLName name;
|
||||
private boolean isPublic;
|
||||
|
||||
+2
-1
@@ -16,9 +16,10 @@
|
||||
package com.alibaba.druid.sql.dialect.oracle.ast.stmt;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropStatement;
|
||||
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
|
||||
|
||||
public class OracleDropDbLinkStatement extends OracleStatementImpl {
|
||||
public class OracleDropDbLinkStatement extends OracleStatementImpl implements SQLDropStatement {
|
||||
|
||||
private boolean isPublic;
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowStatement;
|
||||
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlUpdateStatement;
|
||||
import com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleAlterIndexStatement;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleExecuteImmediateStatement;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleMultiInsertStatement;
|
||||
import com.alibaba.druid.sql.dialect.postgresql.ast.stmt.PGShowStatement;
|
||||
import com.alibaba.druid.sql.dialect.sqlserver.ast.stmt.SQLServerExecStatement;
|
||||
@@ -2486,7 +2487,9 @@ public class WallVisitorUtils {
|
||||
allow = config.isMergeAllow();
|
||||
denyMessage = "merge not allow";
|
||||
errorCode = ErrorCode.MERGE_NOT_ALLOW;
|
||||
} else if (x instanceof SQLCallStatement || x instanceof SQLServerExecStatement) {
|
||||
} else if (x instanceof SQLCallStatement
|
||||
|| x instanceof SQLServerExecStatement
|
||||
|| x instanceof OracleExecuteImmediateStatement) {
|
||||
allow = config.isCallAllow();
|
||||
denyMessage = "call not allow";
|
||||
errorCode = ErrorCode.CALL_NOT_ALLOW;
|
||||
@@ -2494,26 +2497,15 @@ public class WallVisitorUtils {
|
||||
allow = config.isTruncateAllow();
|
||||
denyMessage = "truncate not allow";
|
||||
errorCode = ErrorCode.TRUNCATE_NOT_ALLOW;
|
||||
} else if (x instanceof SQLCreateTableStatement //
|
||||
|| x instanceof SQLCreateIndexStatement //
|
||||
|| x instanceof SQLCreateViewStatement //
|
||||
|| x instanceof SQLCreateTriggerStatement //
|
||||
|| x instanceof SQLCreateSequenceStatement //
|
||||
) {
|
||||
} else if (x instanceof SQLCreateStatement) {
|
||||
allow = config.isCreateTableAllow();
|
||||
denyMessage = "create table not allow";
|
||||
errorCode = ErrorCode.CREATE_TABLE_NOT_ALLOW;
|
||||
} else if (x instanceof SQLAlterTableStatement || x instanceof OracleAlterIndexStatement) {
|
||||
} else if (x instanceof SQLAlterStatement) {
|
||||
allow = config.isAlterTableAllow();
|
||||
denyMessage = "alter table not allow";
|
||||
errorCode = ErrorCode.ALTER_TABLE_NOT_ALLOW;
|
||||
} else if (x instanceof SQLDropTableStatement //
|
||||
|| x instanceof SQLDropIndexStatement //
|
||||
|| x instanceof SQLDropViewStatement //
|
||||
|| x instanceof SQLDropTriggerStatement //
|
||||
|| x instanceof SQLDropSequenceStatement //
|
||||
|| x instanceof SQLDropProcedureStatement //
|
||||
) {
|
||||
} else if (x instanceof SQLDropStatement) {
|
||||
allow = config.isDropTableAllow();
|
||||
denyMessage = "drop table not allow";
|
||||
errorCode = ErrorCode.DROP_TABLE_NOT_ALLOW;
|
||||
|
||||
Reference in New Issue
Block a user