mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve wall filter
This commit is contained in:
@@ -36,22 +36,26 @@ public class WallCheckResult {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public WallCheckResult(WallSqlStat sqlStat){
|
||||
public WallCheckResult(WallSqlStat sqlStat, List<SQLStatement> stmtList){
|
||||
if (sqlStat != null) {
|
||||
tableStats = sqlStat.getTableStats();
|
||||
violations = sqlStat.getViolations();
|
||||
functionStats = sqlStat.getFunctionStats();
|
||||
statementList = Collections.emptyList();
|
||||
statementList = stmtList;
|
||||
syntaxError = sqlStat.isSyntaxError();
|
||||
} else {
|
||||
tableStats = Collections.emptyMap();
|
||||
violations = Collections.emptyList();
|
||||
functionStats = Collections.emptyMap();
|
||||
statementList = Collections.emptyList();
|
||||
statementList = stmtList;
|
||||
syntaxError = false;
|
||||
}
|
||||
}
|
||||
|
||||
public WallCheckResult(WallSqlStat sqlStat){
|
||||
this(sqlStat, Collections.<SQLStatement> emptyList());
|
||||
}
|
||||
|
||||
public WallCheckResult(List<Violation> violations, Map<String, WallSqlTableStat> tableStats,
|
||||
Map<String, WallSqlFunctionStat> functionStats, List<SQLStatement> statementList,
|
||||
boolean syntaxError){
|
||||
@@ -70,7 +74,6 @@ public class WallCheckResult {
|
||||
return statementList;
|
||||
}
|
||||
|
||||
|
||||
public Map<String, WallSqlTableStat> getTableStats() {
|
||||
return tableStats;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user