R - 查询结果类型Self - Selfpublic static interface QueryHelper.ColumnMapperSpec<R,Self extends QueryHelper.ColumnMapperSpec<R,Self>>
| 限定符和类型 | 方法和说明 |
|---|---|
Self |
all(Class<?> tableType)
查询指定类型对应的表的全部字段.
|
<V> Self |
all(Class<?> tableType,
QueryHelper.Setter<R,V> setter)
查询指定类型对应的表的全部字段并映射到结果类型的一个字段中.
|
Self |
all(String tableOrAlias)
查询指定表的全部字段.
|
<V> Self |
all(String tableOrAlias,
QueryHelper.Setter<R,V> setter)
查询指定类型对应的表的全部字段并映射到结果类型的一个字段中.
|
<S,V> Self |
as(QueryHelper.Getter<S,V> column,
QueryHelper.Setter<R,V> target)
指定查询的列名,以及映射到结果类型的字段.
|
<S,V> Self |
as(QueryHelper.Getter<S,V> column,
String target)
指定查询的列名,以及映射到结果类型的字段.
|
<V> Self |
as(String column,
QueryHelper.Setter<R,V> target)
指定查询的列名,以及映射到结果类型的字段.
|
Self |
as(String column,
String target)
指定查询的列名,以及映射到结果类型的字段.
|
<V> Self all(Class<?> tableType, QueryHelper.Setter<R,V> setter)
all(DetailEntity.class,MyEntity::setDetail)
如果setter对应的属性类型为List,则自动进行一对多查询. 此时不支持按关联表进行条件查询主表的数据.
tableType - 类型,只能是from或者join的类型.QueryHelper.combineOneToMany(Flux, Getter, ReactiveQuery, Getter, Setter)Self all(String tableOrAlias)
tableOrAlias - 表名或者join别名,只能是from或者join的表.<V> Self all(String tableOrAlias, QueryHelper.Setter<R,V> setter)
all("detail",MyEntity::setDetail)
tableOrAlias - 表名或者join别名,只能是from或者join的表.<S,V> Self as(QueryHelper.Getter<S,V> column, QueryHelper.Setter<R,V> target)
as(DetailEntity::getName,MyEntity::setDetailName)
S - SV - Vcolumn - 列名target - 结果类型字段<S,V> Self as(QueryHelper.Getter<S,V> column, String target)
as(DetailEntity::getName,"detail.name")
S - SV - Vcolumn - 列名target - 结果类型字段<V> Self as(String column, QueryHelper.Setter<R,V> target)
as("_d.name",MyEntity::setDetailName)
column - 列名target - 结果类型字段Copyright © 2016–2023. All rights reserved.