| 程序包 | 说明 |
|---|---|
| net.hasor.db.lambda |
提供单表的 CURD 能力,并提供 lambda 方式操作操作数据库。
|
| net.hasor.db.lambda.core |
| 限定符和类型 | 接口和说明 |
|---|---|
static interface |
LambdaOperations.LambdaUpdate<T>
lambda update
|
| 限定符和类型 | 方法和说明 |
|---|---|
UpdateExecute<T> |
UpdateExecute.allowEmptyWhere()
允许空 Where条件(注意:空 Where 条件会导致更新整个数据库)
|
UpdateExecute<T> |
UpdateExecute.updateByColumn(Collection<String> setColumns,
T newValue)
更新数据,map key 为列名
|
UpdateExecute<T> |
UpdateExecute.updateByColumn(Map<String,Object> newValue)
更新数据,map key 为列名
|
UpdateExecute<T> |
UpdateExecute.updateBySample(T sample)
sample 中不为空的属性作为 set 的值
|
UpdateExecute<T> |
UpdateExecute.updateTo(T newValue)
所有属性都作为 set 的值
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
LambdaUpdateWrapper<T>
提供 lambda update 能力,是 LambdaUpdate 接口的实现类。
|
| 限定符和类型 | 方法和说明 |
|---|---|
UpdateExecute<T> |
LambdaUpdateWrapper.allowEmptyWhere() |
UpdateExecute<T> |
LambdaUpdateWrapper.updateByColumn(Collection<String> setColumns,
T newValue) |
UpdateExecute<T> |
LambdaUpdateWrapper.updateByColumn(Map<String,Object> newValue) |
UpdateExecute<T> |
LambdaUpdateWrapper.updateBySample(T sample) |
protected UpdateExecute<T> |
LambdaUpdateWrapper.updateTo(Predicate<ColumnMapping> tester,
Function<ColumnMapping,Object> propertyReader) |
UpdateExecute<T> |
LambdaUpdateWrapper.updateTo(T newValue) |
Copyright © 2021. All rights reserved.