接口 InnerInterceptor
-
- 所有已知实现类:
BlockAttackInnerInterceptor,DataPermissionInterceptor,DynamicTableNameInnerInterceptor,IllegalSQLInnerInterceptor,OptimisticLockerInnerInterceptor,PaginationInnerInterceptor,ReplacePlaceholderInnerInterceptor,TenantLineInnerInterceptor
public interface InnerInterceptor- 从以下版本开始:
- 3.4.0
- 作者:
- miemie
-
-
方法概要
所有方法 实例方法 默认方法 修饰符和类型 方法 说明 default voidbeforeGetBoundSql(org.apache.ibatis.executor.statement.StatementHandler sh)StatementHandler.getBoundSql()操作前置处理default voidbeforePrepare(org.apache.ibatis.executor.statement.StatementHandler sh, java.sql.Connection connection, java.lang.Integer transactionTimeout)StatementHandler.prepare(Connection, Integer)操作前置处理default voidbeforeQuery(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, java.lang.Object parameter, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.session.ResultHandler resultHandler, org.apache.ibatis.mapping.BoundSql boundSql)Executor.query(MappedStatement, Object, RowBounds, ResultHandler, CacheKey, BoundSql)操作前置处理default voidbeforeUpdate(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, java.lang.Object parameter)Executor.update(MappedStatement, Object)操作前置处理default voidsetProperties(java.util.Properties properties)default booleanwillDoQuery(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, java.lang.Object parameter, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.session.ResultHandler resultHandler, org.apache.ibatis.mapping.BoundSql boundSql)判断是否执行Executor.query(MappedStatement, Object, RowBounds, ResultHandler, CacheKey, BoundSql)default booleanwillDoUpdate(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, java.lang.Object parameter)判断是否执行Executor.update(MappedStatement, Object)
-
-
-
方法详细资料
-
willDoQuery
default boolean willDoQuery(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, java.lang.Object parameter, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.session.ResultHandler resultHandler, org.apache.ibatis.mapping.BoundSql boundSql) throws java.sql.SQLException判断是否执行Executor.query(MappedStatement, Object, RowBounds, ResultHandler, CacheKey, BoundSql)如果不执行query操作,则返回
Collections.emptyList()- 参数:
executor- Executor(可能是代理对象)ms- MappedStatementparameter- parameterrowBounds- rowBoundsresultHandler- resultHandlerboundSql- boundSql- 返回:
- 新的 boundSql
- 抛出:
java.sql.SQLException
-
beforeQuery
default void beforeQuery(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, java.lang.Object parameter, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.session.ResultHandler resultHandler, org.apache.ibatis.mapping.BoundSql boundSql) throws java.sql.SQLExceptionExecutor.query(MappedStatement, Object, RowBounds, ResultHandler, CacheKey, BoundSql)操作前置处理改改sql啥的
- 参数:
executor- Executor(可能是代理对象)ms- MappedStatementparameter- parameterrowBounds- rowBoundsresultHandler- resultHandlerboundSql- boundSql- 抛出:
java.sql.SQLException
-
willDoUpdate
default boolean willDoUpdate(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, java.lang.Object parameter) throws java.sql.SQLException判断是否执行Executor.update(MappedStatement, Object)如果不执行update操作,则影响行数的值为 -1
- 参数:
executor- Executor(可能是代理对象)ms- MappedStatementparameter- parameter- 抛出:
java.sql.SQLException
-
beforeUpdate
default void beforeUpdate(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, java.lang.Object parameter) throws java.sql.SQLExceptionExecutor.update(MappedStatement, Object)操作前置处理改改sql啥的
- 参数:
executor- Executor(可能是代理对象)ms- MappedStatementparameter- parameter- 抛出:
java.sql.SQLException
-
beforePrepare
default void beforePrepare(org.apache.ibatis.executor.statement.StatementHandler sh, java.sql.Connection connection, java.lang.Integer transactionTimeout)StatementHandler.prepare(Connection, Integer)操作前置处理改改sql啥的
- 参数:
sh- StatementHandler(可能是代理对象)connection- ConnectiontransactionTimeout- transactionTimeout
-
beforeGetBoundSql
default void beforeGetBoundSql(org.apache.ibatis.executor.statement.StatementHandler sh)
StatementHandler.getBoundSql()操作前置处理只有
BatchExecutor和ReuseExecutor才会调用到这个方法- 参数:
sh- StatementHandler(可能是代理对象)
-
setProperties
default void setProperties(java.util.Properties properties)
-
-