Interface MappedQuery<T>
- Type Parameters:
T- 查询类型泛型
- All Known Implementing Classes:
MappedQuery.Default
public interface MappedQuery<T>
查询映射
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription<C extends Collection<T>>
Ccollection(C collection) 查询为集合default Tfirst()查询第一条数据,自行确保sql查询结果为一条记录查询第一条数据,自行确保sql查询结果为一条记录list()查询为list查询为liststatic <T> MappedQuery<T> of(JdbcExecutor executor, String sql, List<?> params, RowMapper<T> rowMapper) 创建查询映射optional()查询为optionalset()查询为set,默认使用LikedHashSet实现,保留原顺序查询为setstream()查询为stream查询为stream
-
Method Details
-
of
static <T> MappedQuery<T> of(JdbcExecutor executor, String sql, List<?> params, RowMapper<T> rowMapper) 创建查询映射- Type Parameters:
T- 类型- Parameters:
executor- 执行器sql- SQLparams- 参数rowMapper- 行映射- Returns:
- 查询映射
-
collection
查询为集合- Type Parameters:
C- 集合类型- Parameters:
collection- 集合- Returns:
- 结果(实际为传入的结合对象,填充了结果)
-
first
-
first
-
list
-
list
-
optional
-
set
-
set
-
stream
-
stream
-