public interface BeeSql
| Modifier and Type | Method and Description |
|---|---|
int |
batch(String[] sqls)
Submits a batch of commands to the database.
|
int |
batch(String[] sqls,
int batchSize)
Submits a batch of commands to the database.
|
long |
insertAndReturnId(String sql)
insert and return the value of primary key.
|
int |
modify(String sql)
Operate update,insert,delete.
|
<T> List<T> |
moreTableSelect(String sql,
T entity)
According to SQL query more table data, data type is consistent with entity type.
|
List<String[]> |
select(String sql)
Select and transform every record to string array.
|
<T> List<T> |
select(String sql,
Class<T> entityClass)
According to SQL query data, data type is consistent with entity type.
|
String |
selectFun(String sql)
Select result with function.
|
String |
selectJson(String sql)
Select and return json format result.
|
List<Map<String,Object>> |
selectMapList(String sql)
Select and transform every record to Map
|
ResultSet |
selectRs(String sql)
select ResultSet.After using the returned ResultSet results, call HoneyContext.clearConnForSelectRs() to close the connection.
|
<T> List<T> |
selectSomeField(String sql,
Class<T> entityClass)
Select some field.
|
<T> List<T> select(String sql, Class<T> entityClass)
sql - SQL select statemententityClass - The entity class corresponding to table and can not be null. (update in v2.0)<T> List<T> selectSomeField(String sql, Class<T> entityClass)
sql - SQL select statemententityClass - The entity class corresponding to table and can not be null. (update in v2.0)String selectFun(String sql)
sql - SQL select statementList<String[]> select(String sql)
sql - SQL select statementString selectJson(String sql)
sql - SQL select statementint modify(String sql)
sql - SQL statement to executelong insertAndReturnId(String sql)
sql - SQL statement to executeint batch(String[] sqls)
sqls - Array of SQL statements to executeint batch(String[] sqls, int batchSize)
sqls - Array of SQL statements to executebatchSize - the size of commands in a batch<T> List<T> moreTableSelect(String sql, T entity)
sql - SQL select statemententity - The entity corresponding to table and can not be null.List<Map<String,Object>> selectMapList(String sql)
sql - SQL select statementCopyright © 2023. All rights reserved.