public interface SaveBasicMapper extends BaseBasicMapper
| 限定符和类型 | 方法和说明 |
|---|---|
default <T> int |
save(Collection<T> list)
多个保存,非批量行为
|
default <T> int |
save(Collection<T> list,
boolean allFieldForce)
多个保存,非批量行为
|
default <T> int |
save(Collection<T> list,
Consumer<SaveStrategy<T>> consumer)
多个保存,非批量行为
|
default <T> int |
save(Collection<T> list,
Getter<T>... forceFields)
多个保存,非批量行为
|
default <T> int |
save(T entity)
实体类新增
|
default <T> int |
save(T entity,
boolean allFieldForce)
实体类新增
|
default <T> int |
save(T entity,
Consumer<SaveStrategy<T>> consumer)
实体类新增
|
default <T> int |
save(T entity,
Getter<T>... forceFields)
实体类新增
|
default <T> int |
saveBatch(Collection<T> list)
使用数据库原生方式批量插入
一次最好在100条内
|
default <T> int |
saveBatch(Collection<T> list,
Consumer<SaveBatchStrategy<T>> saveBatchStrategy)
使用数据库原生方式批量插入
一次最好在100条内
|
default <T> int |
saveBatch(Collection<T> list,
Getter<T>... forceFields)
使用数据库原生方式批量插入
一次最好在100条内
会自动加入 主键 租户ID 逻辑删除列 乐观锁
自动设置 默认值,不会忽略NULL值字段
|
getBasicMapper$count, $countFromQuery, $cursor, $delete, $get, $getById, $list, $mapWithKey, $save, $saveEntity, $saveModel, $updatedefault <T> int save(T entity,
Consumer<SaveStrategy<T>> consumer)
entity - 实体类实例consumer - 保存策略default <T> int save(T entity)
entity - default <T> int save(T entity,
boolean allFieldForce)
entity - 实体类实例allFieldForce - 所有字段都强制保存,null值将会以NULL的形式插入default <T> int save(T entity,
Getter<T>... forceFields)
entity - 实体类实例forceFields - 指定那些列强制插入,null值将会以NULL的形式插入default <T> int save(Collection<T> list, Consumer<SaveStrategy<T>> consumer)
list - consumer - 保存策略default <T> int save(Collection<T> list)
list - default <T> int save(Collection<T> list, boolean allFieldForce)
list - allFieldForce - 所有字段都强制保存,null值将会以NULL的形式插入default <T> int save(Collection<T> list, Getter<T>... forceFields)
list - forceFields - 指定那些列强制插入,null值将会以NULL的形式插入default <T> int saveBatch(Collection<T> list, Consumer<SaveBatchStrategy<T>> saveBatchStrategy)
list - 需要插入数据saveBatchStrategy - 插入策略default <T> int saveBatch(Collection<T> list)
list - default <T> int saveBatch(Collection<T> list, Getter<T>... forceFields)
会自动加入 主键 租户ID 逻辑删除列 乐观锁 自动设置 默认值,不会忽略NULL值字段
list - forceFields - 指定那些列强制插入,null值将会以NULL的形式插入Copyright © 2025. All rights reserved.