Package com.alibaba.druid.wall
Class WallProvider
java.lang.Object
com.alibaba.druid.wall.WallProvider
- Direct Known Subclasses:
ClickhouseWallProvider,DB2WallProvider,MySqlWallProvider,OracleWallProvider,PGWallProvider,SQLiteWallProvider,SQLServerWallProvider
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AtomicLongprotected final AtomicLongfinal WallDenyStatprotected final WallConfigprotected DbTypeprotected final AtomicLongprotected final AtomicLongprotected final AtomicLongprotected final AtomicLongprotected final AtomicLong -
Constructor Summary
ConstructorsConstructorDescriptionWallProvider(WallConfig config) WallProvider(WallConfig config, DbType dbType) WallProvider(WallConfig config, String dbType) -
Method Summary
Modifier and TypeMethodDescriptionaddBlackSql(String sql, Map<String, WallSqlTableStat> tableStats, Map<String, WallSqlFunctionStat> functionStats, List<Violation> violations, boolean syntaxError) voidaddFetchRowCount(WallSqlStat sqlStat, long fetchRowCount) voidaddUpdateCount(WallSqlStat sqlStat, long updateCount) voidaddViolationEffectRowCount(long rowCount) addWhiteSql(String sql, Map<String, WallSqlTableStat> tableStats, Map<String, WallSqlFunctionStat> functionStats, boolean syntaxError) booleancheckDenyFunction(String functionName) booleancheckDenySchema(String schemaName) booleancheckDenyTable(String tableName) booleancheckReadOnlyTable(String tableName) booleancheckValid(String sql) voidvoidvoidabstract ExportParameterVisitorabstract SQLStatementParsercreateParser(String sql) abstract WallVisitorstatic <T> TdoPrivileged(PrivilegedAction<T> action) longgetBlackSql(String sql) longgetFunctionStat(String functionName) getFunctionStatWithLowerName(String lowerCaseName) longgetName()getSqlStat(String sql) getStatValue(boolean reset) longgetTableStat(String tableName) getTableStatWithLowerName(String lowerCaseName) static ObjectlonglonglonggetWhiteSql(String sql) voidbooleanstatic booleanbooleanvoidreset()voidsetBlackListEnable(boolean blackListEnable) voidstatic voidsetTenantValue(Object value) voidsetWhiteListEnable(boolean whiteListEnable) booleanwhiteContains(String sql)
-
Field Details
-
config
-
commentDeniedStat
-
dbType
-
checkCount
-
hardCheckCount
-
whiteListHitCount
-
blackListHitCount
-
syntaxErrorCount
-
violationCount
-
violationEffectRowCount
-
-
Constructor Details
-
WallProvider
-
WallProvider
-
WallProvider
-
-
Method Details
-
getName
-
setName
-
getAttributes
-
reset
public void reset() -
getTableStats
-
getFunctionStats
-
getSqlStat
-
getTableStat
-
addUpdateCount
-
addFetchRowCount
-
getTableStatWithLowerName
-
getFunctionStat
-
getFunctionStatWithLowerName
-
getConfig
-
addWhiteSql
public WallSqlStat addWhiteSql(String sql, Map<String, WallSqlTableStat> tableStats, Map<String, WallSqlFunctionStat> functionStats, boolean syntaxError) -
addBlackSql
public WallSqlStat addBlackSql(String sql, Map<String, WallSqlTableStat> tableStats, Map<String, WallSqlFunctionStat> functionStats, List<Violation> violations, boolean syntaxError) -
getWhiteList
-
getSqlList
-
getBlackList
-
clearCache
public void clearCache() -
clearWhiteList
public void clearWhiteList() -
clearBlackList
public void clearBlackList() -
getWhiteSql
-
getBlackSql
-
whiteContains
-
createParser
-
createWallVisitor
-
createExportParameterVisitor
-
checkValid
-
incrementCommentDeniedCount
public void incrementCommentDeniedCount() -
checkDenyFunction
-
checkDenySchema
-
checkDenyTable
-
checkReadOnlyTable
-
getCommentDenyStat
-
check
-
ispPrivileged
public static boolean ispPrivileged() -
doPrivileged
-
setTenantValue
-
getTenantValue
-
getWhiteListHitCount
public long getWhiteListHitCount() -
getBlackListHitCount
public long getBlackListHitCount() -
getSyntaxErrorCount
public long getSyntaxErrorCount() -
getCheckCount
public long getCheckCount() -
getViolationCount
public long getViolationCount() -
getHardCheckCount
public long getHardCheckCount() -
getViolationEffectRowCount
public long getViolationEffectRowCount() -
addViolationEffectRowCount
public void addViolationEffectRowCount(long rowCount) -
getStatValue
-
getStatsMap
-
isWhiteListEnable
public boolean isWhiteListEnable() -
setWhiteListEnable
public void setWhiteListEnable(boolean whiteListEnable) -
isBlackListEnable
public boolean isBlackListEnable() -
setBlackListEnable
public void setBlackListEnable(boolean blackListEnable)
-