public class QuerySqlDevice extends Object implements QuerySql
| 构造器和说明 |
|---|
QuerySqlDevice(Manager manager,
String sql,
Object... paramers) |
| 限定符和类型 | 方法和说明 |
|---|---|
QuerySql |
addCondition(Condition cond)
Add the query condition, which does not require value,
eg: name is not null addCondition("name",
Conditions.IS_NOT_NULL) |
QuerySql |
addCondition(Consumer<List<Condition>> consumer) |
QuerySql |
addParamer(Object... paramers)
Add parameters to your SQL to replace the question mark?
|
QuerySql |
alias(Map<String,String> aliases) |
<T> List<T> |
entities(Class<T> entityClass) |
<T> Optional<T> |
entity(Class<T> entityClass) |
List<Column> |
getQueryColumns()
Gets the columns contained in the query result.
|
<T> List<T> |
list()
If you need to return a result set instead of a single item; The return type
is automatically determined by the constructor.
|
<T> List<T> |
list(Class<T> entityClass) |
Optional<Map<String,Object>> |
map()
The result set encapsulated in the form of
Map<String,Object>This will be an acceptable way to get the mapping of SQL result sets |
List<Map<String,Object>> |
maps()
The result set encapsulated in the form of
List<Map<String,Object>>This will be an acceptable way to get the mapping of SQL result sets |
List<Map<String,Object>> |
stream(int count)
An extension to the
Stream interface,Returns the specified number of
results from the SQL statement |
void |
stream(int bufferSize,
Consumer<List<Map<String,Object>>> consumer) |
void |
stream(int bufferSize,
Consumer<Map<String,Object>> rowProcess,
Consumer<List<Map<String,Object>>> consumer) |
void |
stream(int bufferSize,
Function<List<Column>,Object> consumer,
StreamConsumer datas) |
<T> Optional<T> |
unique()
Returns a single result;The return type is automatically determined based on
the constructor, and if you want to return an entity type, add before that
|
<T> Optional<T> |
unique(Class<T> entityClass)
Specify entity class mappings
|
int |
update() |
public QuerySql addParamer(Object... paramers)
QuerySqladdParamer 在接口中 QuerySqlpublic <T> List<T> list()
QuerySql
If you need to return a result set instead of a single item; The return type
is automatically determined by the constructor. If you want to return an
entity type, add the entity type before the QuerySql.list(Class) method
The method is equivalent to the integrator of two methods
list 在接口中 QuerySqlQuerySql.entities(Class),
QuerySql.maps()public List<Map<String,Object>> maps()
QuerySqlList<Map<String,Object>>public void stream(int bufferSize,
Consumer<Map<String,Object>> rowProcess,
Consumer<List<Map<String,Object>>> consumer)
public void stream(int bufferSize,
Function<List<Column>,Object> consumer,
StreamConsumer datas)
public List<Map<String,Object>> stream(int count)
QuerySqlStream interface,Returns the specified number of
results from the SQL statementpublic Optional<Map<String,Object>> map()
QuerySqlMap<String,Object>public <T> Optional<T> unique()
QuerySqlpublic List<Column> getQueryColumns()
QuerySqlgetQueryColumns 在接口中 QuerySqlpublic <T> Optional<T> unique(Class<T> entityClass)
QuerySqlpublic QuerySql addCondition(Consumer<List<Condition>> consumer)
addCondition 在接口中 ConditionAbleaddCondition 在接口中 QuerySqlconsumer - - conditionspublic QuerySql addCondition(Condition cond)
ConditionAblename is not null addCondition("name", Conditions.IS_NOT_NULL)
addCondition 在接口中 ConditionAbleaddCondition 在接口中 QuerySqlCopyright © 2023. All rights reserved.