java.lang.Object
org.miaixz.bus.mapper.support.keysql.GenIdSqlSource
- All Implemented Interfaces:
org.apache.ibatis.mapping.SqlSource
封装 SqlSource 以实现在插入前生成主键。
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
ConstructorsConstructorDescriptionGenIdSqlSource(org.apache.ibatis.mapping.SqlSource sqlSource, GenIdKeyGenerator keyGenerator) 构造函数,初始化 SQL 源和主键生成器。 -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.ibatis.mapping.BoundSqlgetBoundSql(Object parameterObject) 获取绑定 SQL,并在必要时提前生成主键。
-
Constructor Details
-
GenIdSqlSource
public GenIdSqlSource(org.apache.ibatis.mapping.SqlSource sqlSource, GenIdKeyGenerator keyGenerator) 构造函数,初始化 SQL 源和主键生成器。- Parameters:
sqlSource- 原始 SQL 源keyGenerator- 主键生成器
-
-
Method Details
-
getBoundSql
获取绑定 SQL,并在必要时提前生成主键。- Specified by:
getBoundSqlin interfaceorg.apache.ibatis.mapping.SqlSource- Parameters:
parameterObject- 参数对象- Returns:
- 绑定后的 SQL 对象
-