public interface DslSession
Modifier and Type | Method and Description |
---|---|
<T> int[] |
batchDelete(Delete delete,
Class<T> requiredType,
List<T> params) |
<T> int[] |
batchDelete(Delete delete,
Class<T> requiredType,
List<T> params,
int batchSize) |
int[] |
batchDelete(Delete delete,
List<List<Object>> params) |
int[] |
batchDelete(Delete delete,
List<List<Object>> params,
int batchSize)
批量删除
|
int[] |
batchDelete(Delete delete,
Map<String,Object>[] params) |
int[] |
batchDelete(Delete delete,
Map<String,Object>[] params,
int batchSize) |
int[] |
batchDelete(List<Delete> deletes)
执行多句删除语句
|
<T> int[] |
batchInsert(Insert insert,
Class<T> requiredType,
List<T> params) |
<T> int[] |
batchInsert(Insert insert,
Class<T> requiredType,
List<T> params,
int batchSize) |
<T> int[] |
batchInsert(Insert insert,
Class<T> requiredType,
List<T> params,
int batchSize,
boolean autoGeneratedKeys)
批量新增
|
int[] |
batchInsert(Insert insert,
List<Map<String,Object>> params) |
int[] |
batchInsert(Insert insert,
List<Map<String,Object>> params,
boolean autoGeneratedKeys)
批量新增 最大batchsize
|
int[] |
batchInsert(Insert insert,
List<Map<String,Object>> params,
int batchSize) |
int[] |
batchInsert(Insert insert,
List<Map<String,Object>> params,
int batchSize,
boolean autoGeneratedKeys)
批量新增
|
int[] |
batchInsert(List<Insert> inserts,
boolean autoGeneratedKeys)
执行多句insert语句
|
int[] |
batchUpdate(List<Update> updates)
执行多句更新语句
|
<T> int[] |
batchUpdate(Update update,
Class<T> requiredType,
List<T> params) |
<T> int[] |
batchUpdate(Update update,
Class<T> requiredType,
List<T> params,
int batchSize) |
int[] |
batchUpdate(Update update,
List<List<Object>> params) |
int[] |
batchUpdate(Update update,
List<List<Object>> params,
int batchSize)
批量更新
|
int[] |
batchUpdate(Update update,
Map<String,Object>[] params) |
int[] |
batchUpdate(Update update,
Map<String,Object>[] params,
int batchSize) |
void |
beginTransaction()
开始事务
|
void |
commitTransaction()
提交事务
|
int |
count(ComplexSelect complexSelect)
查询总记录数
|
int |
count(Select select)
查询总记录数
|
int |
execute(Delete delete)
执行删除语句
|
int |
execute(Insert insert)
执行Insert语句,返回值为受影响记录数
|
int |
execute(Update update)
执行更新语句,默认是不忽略空值的
|
int |
execute(Update update,
boolean ignoreNull)
执行更新语句
|
<T> T |
executeAndReturnObject(Insert insert)
执行Insert语句,返回值为自增长的主键值,由数据库来生成主键值.该方法不能用于执行insert into。。。select语句
|
<T> T |
executeAndReturnObject(Insert insert,
Class<T> clazz)
执行Insert语句,返回值为自增长的主键值,由数据库来生成主键值.该方法不能用于执行insert into。。。select语句
|
<T> T |
executeAndReturnObject(Insert insert,
Class<T> clazz,
boolean autoGeneratedKeys)
执行Insert语句,返回值为自增长的主键值。该方法不能用于执行insert into。。。select语句
|
void |
extractResultSet(ComplexSelect complexSelect,
ResultSetCallback callback) |
void |
extractResultSet(Select select,
ResultSetCallback callback)
resultset处理
|
void |
extractResultSet(String sql,
Object[] values,
ResultSetCallback callback) |
<T> T[] |
fetchArray(ComplexSelect complexSelect,
Class<T> requiredType)
把所有的结果变成一个对象数组返回
|
<T> T[] |
fetchArray(Select select,
Class<T> requiredType)
把所有的结果变成一个对象数组返回
|
<T> Pager<T> |
fetchCursorPage(ComplexSelect complexSelect,
int start,
int limit,
Class<T> requiredType)
基于游标的分页方式,select对象生成的sql语句是不包含分页信息的
|
<T> Pager<T> |
fetchCursorPage(Select commonSelect,
int start,
int limit,
Class<T> requiredType)
基于游标的分页方式,select对象生成的sql语句是不包含分页信息的
|
<T> List<T> |
fetchCursorPageList(ComplexSelect complexSelect,
int start,
int limit,
Class<T> requiredType)
基于游标的分页方式,select对象生成的sql语句是不包含分页信息的
|
<T> List<T> |
fetchCursorPageList(Select commonSelect,
int start,
int limit,
Class<T> requiredType)
基于游标的分页方式,select对象生成的sql语句是不包含分页信息的
|
<T> Pager<T> |
fetchDialectPage(ComplexSelect complexSelect,
int start,
int limit,
Class<T> requiredType)
基于方言的分页方式,select对象生成的sql语句是包含分页信息的
|
<T> Pager<T> |
fetchDialectPage(Select commonSelect,
int start,
int limit,
Class<T> requiredType)
基于方言的分页方式,select对象生成的sql语句是包含分页信息的
|
<T> List<T> |
fetchDialectPageList(ComplexSelect complexSelect,
int start,
int limit,
Class<T> requiredType)
基于方言的分页方式,select对象生成的sql语句是包含分页信息的
|
<T> List<T> |
fetchDialectPageList(Select commonSelect,
int start,
int limit,
Class<T> requiredType)
基于方言的分页方式,select对象生成的sql语句是包含分页信息的
|
<T> List<T> |
fetchList(ComplexSelect complexSelect,
Class<T> requiredType)
把所有的结果变成一个对象列表返回
|
<T> List<T> |
fetchList(Select select,
Class<T> requiredType)
把所有的结果变成一个对象列表返回
|
<T> T |
fetchOneResult(ComplexSelect complexSelect,
Class<T> requiredType)
返回一个结果,既然是有多个结果也只返回第一个结果
|
<T> T |
fetchOneResult(Select select,
Class<T> requiredType)
返回一个结果,既然是有多个结果也只返回第一个结果
|
<T> Pager<T> |
fetchPage(ComplexSelect complexSelect,
int start,
int limit,
boolean isCursor,
Class<T> requiredType)
分页处理
|
<T> Pager<T> |
fetchPage(Select commonSelect,
int start,
int limit,
boolean isCursor,
Class<T> requiredType)
分页处理
|
<T> List<T> |
fetchPageList(ComplexSelect complexSelect,
int start,
int limit,
boolean isCursor,
Class<T> requiredType)
分页处理
|
<T> List<T> |
fetchPageList(Select commonSelect,
int start,
int limit,
boolean isCursor,
Class<T> requiredType)
分页处理
|
void |
rollbackTransaction()
回滚事务
|
int execute(Insert insert)
insert
- <T> T executeAndReturnObject(Insert insert)
insert
- <T> T executeAndReturnObject(Insert insert, Class<T> clazz)
insert
- clazz
- 返回对象的类型<T> T executeAndReturnObject(Insert insert, Class<T> clazz, boolean autoGeneratedKeys)
insert
- autoGeneratedKeys
- true:由数据库来生成主键值,false:由应用层来生成主键int execute(Update update)
update
- int execute(Update update, boolean ignoreNull)
update
- 更新语句ignoreNull
- 忽略空值int execute(Delete delete)
delete
- <T> T fetchOneResult(Select select, Class<T> requiredType)
T
- select
- requiredType
- <T> T[] fetchArray(Select select, Class<T> requiredType)
T
- select
- requiredType
- <T> List<T> fetchList(Select select, Class<T> requiredType)
T
- select
- requiredType
- <T> T fetchOneResult(ComplexSelect complexSelect, Class<T> requiredType)
T
- complexSelect
- requiredType
- <T> T[] fetchArray(ComplexSelect complexSelect, Class<T> requiredType)
T
- complexSelect
- requiredType
- <T> List<T> fetchList(ComplexSelect complexSelect, Class<T> requiredType)
T
- complexSelect
- requiredType
- <T> Pager<T> fetchPage(Select commonSelect, int start, int limit, boolean isCursor, Class<T> requiredType)
T
- pageSelect
- 普通sql,分页sql由框架组装start
- limit
- isCursor
- requiredType
- <T> Pager<T> fetchCursorPage(Select commonSelect, int start, int limit, Class<T> requiredType)
T
- commonSelect
- 普通sql,分页sql由框架组装start
- limit
- requiredType
- <T> Pager<T> fetchDialectPage(Select commonSelect, int start, int limit, Class<T> requiredType)
T
- commonSelect
- 普通sql,分页sql由框架组装start
- limit
- requiredType
- <T> List<T> fetchPageList(Select commonSelect, int start, int limit, boolean isCursor, Class<T> requiredType)
T
- commonSelect
- 普通sql,分页sql由框架组装start
- limit
- isCursor
- requiredType
- <T> List<T> fetchCursorPageList(Select commonSelect, int start, int limit, Class<T> requiredType)
T
- commonSelect
- 普通sql,分页sql由框架组装start
- limit
- requiredType
- <T> List<T> fetchDialectPageList(Select commonSelect, int start, int limit, Class<T> requiredType)
T
- commonSelect
- 普通sql,分页sql由框架组装start
- limit
- requiredType
- int count(Select select)
select
- int[] batchInsert(Insert insert, List<Map<String,Object>> params, int batchSize, boolean autoGeneratedKeys)
insert
- 生成批量新增的sql语句params
- 批量操作的参数batchSize
- 一次批量操作的最大数量autoGeneratedKeys
- 主键值是否由数据库自动生成int[] batchInsert(Insert insert, List<Map<String,Object>> params, boolean autoGeneratedKeys)
insert
- params
- autoGeneratedKeys
- <T> int[] batchInsert(Insert insert, Class<T> requiredType, List<T> params, int batchSize)
<T> int[] batchInsert(Insert insert, Class<T> requiredType, List<T> params, int batchSize, boolean autoGeneratedKeys)
insert
- 生成批量新增的sql语句params
- 批量操作的参数batchSize
- 一次批量操作的最大数量autoGeneratedKeys
- 主键值是否由数据库自动生成int[] batchUpdate(Update update, List<List<Object>> params, int batchSize)
update
- 生成update 语句params
- 参数batchSize
- 一次批量更新的最大数量<T> int[] batchUpdate(Update update, Class<T> requiredType, List<T> params, int batchSize)
int[] batchDelete(Delete delete, List<List<Object>> params, int batchSize)
delete
- 生成delete语句params
- 参数batchSize
- 一次批量删除的最大数量<T> int[] batchDelete(Delete delete, Class<T> requiredType, List<T> params, int batchSize)
int[] batchInsert(List<Insert> inserts, boolean autoGeneratedKeys)
sqls
- autoGeneratedKeys
- 是否启动主键值自动生成void extractResultSet(Select select, ResultSetCallback callback)
select
- callback
- 结果集回调接口,在回调方法进行resultset处理void extractResultSet(String sql, Object[] values, ResultSetCallback callback)
void extractResultSet(ComplexSelect complexSelect, ResultSetCallback callback)
void beginTransaction()
void commitTransaction()
void rollbackTransaction()
<T> Pager<T> fetchPage(ComplexSelect complexSelect, int start, int limit, boolean isCursor, Class<T> requiredType)
T
- complexSelect
- 普通sql,分页sql由框架组装start
- limit
- isCursor
- requiredType
- <T> Pager<T> fetchCursorPage(ComplexSelect complexSelect, int start, int limit, Class<T> requiredType)
T
- complexSelect
- 普通sql,分页sql由框架组装start
- limit
- requiredType
- <T> Pager<T> fetchDialectPage(ComplexSelect complexSelect, int start, int limit, Class<T> requiredType)
T
- complexSelect
- 普通sql,分页sql由框架组装start
- limit
- requiredType
- <T> List<T> fetchPageList(ComplexSelect complexSelect, int start, int limit, boolean isCursor, Class<T> requiredType)
T
- complexSelect
- 普通sql,分页sql由框架组装start
- limit
- isCursor
- requiredType
- <T> List<T> fetchCursorPageList(ComplexSelect complexSelect, int start, int limit, Class<T> requiredType)
T
- complexSelect
- 普通sql,分页sql由框架组装start
- limit
- requiredType
- <T> List<T> fetchDialectPageList(ComplexSelect complexSelect, int start, int limit, Class<T> requiredType)
T
- complexSelect
- 普通sql,分页sql由框架组装start
- limit
- requiredType
- int count(ComplexSelect complexSelect)
complexSelect
- Copyright © 2006–2018 TinyGroup. All rights reserved.