Interface InsertUseGeneratedKeysMapper<T>

Type Parameters:
T - 泛型
All Known Subinterfaces:
MySqlMapper<T>

public interface InsertUseGeneratedKeysMapper<T>
通用Mapper接口,特殊方法,批量插入,支持批量插入的数据库都可以使用,例如mysql,h2等
Since:
Java 17+
Author:
Kimi Liu
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    插入数据,限制为实体包含`id`属性并且必须为自增列,实体配置的主键策略无效
  • Method Details

    • insertUseGeneratedKeys

      @Options(useGeneratedKeys=true) @InsertProvider(type=SpecialProvider.class, method="dynamicSQL") int insertUseGeneratedKeys(T record)
      插入数据,限制为实体包含`id`属性并且必须为自增列,实体配置的主键策略无效
      Parameters:
      record - 记录值
      Returns:
      the int