| Package | Description |
|---|---|
| io.mybatis.mapper | |
| io.mybatis.mapper.fn |
| Modifier and Type | Method and Description |
|---|---|
int |
BaseMapper.updateByPrimaryKeySelectiveWithForceFields(T entity,
Fn.Fns<T> forceUpdateFields)
根据主键更新实体中不为空的字段,强制字段不区分是否 null,都更新
|
| Modifier and Type | Method and Description |
|---|---|
static <E> Fn.Fns<E> |
Fn.of(Class<E> entityClass,
Fn<E,Object>... fns)
指定字段集合的虚拟表,当通过基类或者泛型基类获取字段时,需要设置字段所属的实体类
|
static <E> Fn.Fns<E> |
Fn.of(Class<E> entityClass,
String... columnNames)
包含部分字段的虚拟表
|
static <E> Fn.Fns<E> |
Fn.of(Fn<E,Object>... fns)
指定字段集合的虚拟表
|
| Modifier and Type | Method and Description |
|---|---|
List<T> |
FnMapper.selectColumns(T entity,
Fn.Fns<T> selectFileds)
根据实体字段条件批量查询(
ExampleMapper 可以实现一样的功能,当前方法只是示例) |
Optional<T> |
FnMapper.selectColumnsOne(T entity,
Fn.Fns<T> selectFileds)
根据实体字段条件查询唯一的实体(
ExampleMapper 可以实现一样的功能,当前方法只是示例) |
int |
FnMapper.updateByPrimaryKeySelectiveWithForceFields(T entity,
Fn.Fns<T> forceUpdateFields)
根据主键更新实体中不为空的字段,强制字段不区分是否 null,都更新
|
Copyright © 2022. All rights reserved.