类 DynamicTableNameInnerInterceptor
java.lang.Object
com.baomidou.mybatisplus.extension.plugins.inner.DynamicTableNameInnerInterceptor
- 所有已实现的接口:
InnerInterceptor
动态表名
- 从以下版本开始:
- 3.4.0
- 作者:
- jobob
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidbeforePrepare(org.apache.ibatis.executor.statement.StatementHandler sh, Connection connection, Integer transactionTimeout) StatementHandler.prepare(Connection, Integer)操作前置处理voidbeforeQuery(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, 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)操作前置处理changeTable(String sql) getHook()回调处理表名处理器,是否 处理表名的情况都在该处理器中自行判断protected StringprocessTableName(String sql) 处理表名解析替换void回调处理voidsetTableNameHandler(TableNameHandler tableNameHandler) 表名处理器,是否 处理表名的情况都在该处理器中自行判断从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor
beforeGetBoundSql, beforeUpdate, setProperties, willDoQuery, willDoUpdate
-
构造器详细资料
-
DynamicTableNameInnerInterceptor
已过时。3.5.11默认构建- 另请参阅:
-
DynamicTableNameInnerInterceptor
-
-
方法详细资料
-
beforeQuery
public void beforeQuery(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, Object parameter, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.session.ResultHandler resultHandler, org.apache.ibatis.mapping.BoundSql boundSql) throws SQLException 从接口复制的说明:InnerInterceptorExecutor.query(MappedStatement, Object, RowBounds, ResultHandler, CacheKey, BoundSql)操作前置处理改改sql啥的
- 指定者:
beforeQuery在接口中InnerInterceptor- 参数:
executor- Executor(可能是代理对象)ms- MappedStatementparameter- parameterrowBounds- rowBoundsresultHandler- resultHandlerboundSql- boundSql- 抛出:
SQLException
-
beforePrepare
public void beforePrepare(org.apache.ibatis.executor.statement.StatementHandler sh, Connection connection, Integer transactionTimeout) 从接口复制的说明:InnerInterceptorStatementHandler.prepare(Connection, Integer)操作前置处理改改sql啥的
- 指定者:
beforePrepare在接口中InnerInterceptor- 参数:
sh- StatementHandler(可能是代理对象)connection- ConnectiontransactionTimeout- transactionTimeout
-
changeTable
-
processTableName
处理表名解析替换- 参数:
sql- 原始sql- 返回:
- 处理完的sql
- 从以下版本开始:
- 3.5.11
-
getHook
回调处理 -
getTableNameHandler
表名处理器,是否 处理表名的情况都在该处理器中自行判断 -
setHook
回调处理 -
setTableNameHandler
表名处理器,是否 处理表名的情况都在该处理器中自行判断
-