public interface DatabaseOperate
| 限定符和类型 | 方法和说明 |
|---|---|
default Boolean |
blockUpdate()
data modify transaction The SqlContext to be executed in the current thread will be executed and automatically
cleared.
|
default Boolean |
blockUpdate(BiConsumer<Boolean,Throwable> consumer)
data modify transaction The SqlContext to be executed in the current thread will be executed and automatically
cleared.
|
CompletableFuture<com.alibaba.nacos.common.model.RestResult<String>> |
dataImport(File file)
data importing, This method is suitable for importing data from external data sources into embedded data
sources.
|
default CompletableFuture<Boolean> |
futureUpdate()
data modify transaction The SqlContext to be executed in the current thread will be executed and automatically
cleared.
|
List<Map<String,Object>> |
queryMany(String sql,
Object[] args)
Data query transaction.
|
<R> List<R> |
queryMany(String sql,
Object[] args,
Class<R> rClass)
Data query transaction.
|
<R> List<R> |
queryMany(String sql,
Object[] args,
org.springframework.jdbc.core.RowMapper<R> mapper)
Data query transaction.
|
<R> R |
queryOne(String sql,
Class<R> cls)
Data query transaction.
|
<R> R |
queryOne(String sql,
Object[] args,
Class<R> cls)
Data query transaction.
|
<R> R |
queryOne(String sql,
Object[] args,
org.springframework.jdbc.core.RowMapper<R> mapper)
Data query transaction.
|
default Boolean |
update(List<ModifyRequest> modifyRequests)
data modify transaction.
|
Boolean |
update(List<ModifyRequest> modifyRequests,
BiConsumer<Boolean,Throwable> consumer)
data modify transaction.
|
<R> R queryOne(String sql, Class<R> cls)
R - return typesql - sqk textcls - target type<R> R queryOne(String sql, Object[] args, Class<R> cls)
R - return typesql - sqk textargs - sql parameterscls - target type<R> R queryOne(String sql, Object[] args, org.springframework.jdbc.core.RowMapper<R> mapper)
R - return typesql - sqk textargs - sql parametersmapper - Database query result converter<R> List<R> queryMany(String sql, Object[] args, org.springframework.jdbc.core.RowMapper<R> mapper)
R - return typesql - sqk textargs - sql parametersmapper - Database query result converter<R> List<R> queryMany(String sql, Object[] args, Class<R> rClass)
R - return typesql - sqk textargs - sql parametersrClass - target typeList<Map<String,Object>> queryMany(String sql, Object[] args)
sql - sqk textargs - sql parametersBoolean update(List<ModifyRequest> modifyRequests, BiConsumer<Boolean,Throwable> consumer)
modifyRequests - Listconsumer - BiConsumerdefault Boolean update(List<ModifyRequest> modifyRequests)
modifyRequests - ListCompletableFuture<com.alibaba.nacos.common.model.RestResult<String>> dataImport(File file)
file - FileCompletableFuturedefault Boolean blockUpdate()
default Boolean blockUpdate(BiConsumer<Boolean,Throwable> consumer)
consumer - the consumerdefault CompletableFuture<Boolean> futureUpdate()
Copyright © 2018–2022 Alibaba Group. All rights reserved.