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:
@@ -31,6 +31,7 @@ public class WallContext {
|
||||
private int unionWarnnings = 0;
|
||||
private int updateNoneConditionWarnnings = 0;
|
||||
private int deleteNoneConditionWarnnings = 0;
|
||||
private int likeNumberWarnnings = 0;
|
||||
|
||||
public WallContext(String dbType){
|
||||
this.dbType = dbType;
|
||||
@@ -141,6 +142,17 @@ public class WallContext {
|
||||
this.warnnings++;
|
||||
}
|
||||
|
||||
public int getLikeNumberWarnnings() {
|
||||
return likeNumberWarnnings;
|
||||
}
|
||||
|
||||
public void incrementLikeNumberWarnnings() {
|
||||
if (likeNumberWarnnings == 0) {
|
||||
this.warnnings++;
|
||||
}
|
||||
likeNumberWarnnings++;
|
||||
}
|
||||
|
||||
public int getUnionWarnnings() {
|
||||
return unionWarnnings;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user