public interface QuerySql extends ConditionAble, Stream
This will operate the SQL statement as you normally would
| 限定符和类型 | 方法和说明 |
|---|---|
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>> conds) |
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 |
<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() |
QuerySql addParamer(Object... paramers)
paramers - int update()
<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. If you want to return an
entity type, add the entity type before the list(Class) method
The method is equivalent to the integrator of two methods
entities(Class),
maps()<T> List<T> entities(Class<T> entityClass)
List<Map<String,Object>> maps()
List<Map<String,Object>>Optional<Map<String,Object>> map()
Map<String,Object><T> Optional<T> unique()
<T> Optional<T> unique(Class<T> entityClass)
entityClass - - Be sure to include an Id annotation to declare the primary keyQuerySql addCondition(Condition cond)
ConditionAblename is not null addCondition("name", Conditions.IS_NOT_NULL)
addCondition 在接口中 ConditionAbleQuerySql addCondition(Consumer<List<Condition>> conds)
addCondition 在接口中 ConditionAbleconds - - conditionsList<Map<String,Object>> stream(int count)
Stream interface,Returns the specified number of
results from the SQL statementcount - Copyright © 2023. All rights reserved.