public class Db extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
deleteBatchByIds(String tableName,
String primaryKey,
Collection<?> ids)
根据 id 集合来批量删除数据
|
static int |
deleteBatchByIds(String schema,
String tableName,
String primaryKey,
Collection<?> ids)
根据 id 集合来批量删除数据
|
static int |
deleteByCondition(String tableName,
QueryCondition condition)
根据 condition 条件删除数据
|
static int |
deleteByCondition(String schema,
String tableName,
QueryCondition condition)
根据 condition 条件删除数据
|
static int |
deleteById(String tableName,
Row row)
根据主键来删除数据,其中 row 是通过
Row.ofKey(RowKey, Object) 来进行构建的 |
static int |
deleteById(String tableName,
String primaryKey,
Object id)
根据主键来删除 1 条数据
|
static int |
deleteById(String schema,
String tableName,
Row row)
根据主键来删除数据,其中 row 是通过
Row.ofKey(RowKey, Object) 来进行构建的 |
static int |
deleteById(String schema,
String tableName,
String primaryKey,
Object id)
根据主键来删除 1 条数据
|
static int |
deleteByMap(String tableName,
Map<String,Object> whereColumns)
根据 map 构建的 where 条件来删除数据
|
static int |
deleteByMap(String schema,
String tableName,
Map<String,Object> whereColumns)
根据 map 构建的 where 条件来删除数据
|
static int |
deleteByQuery(String tableName,
QueryWrapper queryWrapper)
根据 query 构建的条件来删除数据
|
static int |
deleteByQuery(String schema,
String tableName,
QueryWrapper queryWrapper)
根据 query 构建的条件来删除数据
|
static int |
deleteBySql(String sql,
Object... args)
编写 delete sql 来删除数据
|
static <M,D> int[] |
executeBatch(Collection<D> datas,
Class<M> mapperClass,
BiConsumer<M,D> consumer)
批量执行工具方法
|
static <M,E> int[] |
executeBatch(Collection<E> datas,
int batchSize,
Class<M> mapperClass,
BiConsumer<M,E> consumer)
批量执行工具方法
|
static <M> int[] |
executeBatch(int totalSize,
int batchSize,
Class<M> mapperClass,
BiConsumer<M,Integer> consumer)
批量执行工具方法
|
static int |
insert(String tableName,
Row row)
往 tableName 插入一条 row 数据
|
static int |
insert(String schema,
String tableName,
Row row)
往 schema.tableName 插入一条 row 数据
|
static int[] |
insertBatch(String tableName,
Collection<Row> rows)
批量插入数据
|
static int[] |
insertBatch(String tableName,
Collection<Row> rows,
int batchSize)
批量插入数据
|
static int[] |
insertBatch(String schema,
String tableName,
Collection<Row> rows)
批量插入数据
|
static int[] |
insertBatch(String schema,
String tableName,
Collection<Row> rows,
int batchSize)
批量插入数据
|
static int |
insertBatchWithFirstRowColumns(String tableName,
List<Row> rows)
批量插入数据,根据第一条内容来构建插入的字段,效率比
insertBatch(String, String, Collection, int) 高 |
static int |
insertBatchWithFirstRowColumns(String schema,
String tableName,
List<Row> rows)
批量插入数据,根据第一条内容来构建插入的字段,效率比
insertBatch(String, String, Collection, int) 高 |
static int |
insertBySql(String sql,
Object... args)
直接编写 sql 插入数据
|
static RowMapperInvoker |
invoker() |
static RowMapperInvoker |
invoker(String environmentId) |
static Page<Row> |
paginate(String tableName,
Number pageNumber,
Number pageSize,
Number totalRow,
QueryCondition condition)
分页查询
|
static Page<Row> |
paginate(String tableName,
Number pageNumber,
Number pageSize,
Number totalRow,
QueryWrapper queryWrapper)
分页查询
|
static Page<Row> |
paginate(String tableName,
Number pageNumber,
Number pageSize,
QueryCondition condition)
分页查询
|
static Page<Row> |
paginate(String tableName,
Number pageNumber,
Number pageSize,
QueryWrapper queryWrapper)
分页查询
|
static Page<Row> |
paginate(String tableName,
Page<Row> page,
QueryWrapper queryWrapper)
分页查询
|
static Page<Row> |
paginate(String schema,
String tableName,
Number pageNumber,
Number pageSize,
Number totalRow,
QueryCondition condition)
分页查询
|
static Page<Row> |
paginate(String schema,
String tableName,
Number pageNumber,
Number pageSize,
Number totalRow,
QueryWrapper queryWrapper)
分页查询
|
static Page<Row> |
paginate(String schema,
String tableName,
Number pageNumber,
Number pageSize,
QueryCondition condition)
分页查询
|
static Page<Row> |
paginate(String schema,
String tableName,
Number pageNumber,
Number pageSize,
QueryWrapper queryWrapper)
分页查询
|
static Page<Row> |
paginate(String schema,
String tableName,
Page<Row> page,
QueryWrapper queryWrapper)
分页查询
|
static List<Row> |
selectAll(String tableName)
查询某张表的所有数据
|
static List<Row> |
selectAll(String schema,
String tableName)
查询某张表的所有数据
|
static long |
selectCount(String sql,
Object... args)
查收 count 数据,一般用于 select count(*)...
|
static long |
selectCountByCondition(String tableName,
QueryCondition condition)
根据 condition 条件来查询数量
|
static long |
selectCountByCondition(String schema,
String tableName,
QueryCondition condition)
根据 condition 条件来查询数量
|
static long |
selectCountByQuery(QueryWrapper queryWrapper)
直接根据 query 来查询数据量
|
static long |
selectCountByQuery(String tableName,
QueryWrapper queryWrapper)
根据 query 构建的条件来查询数据量
|
static long |
selectCountByQuery(String schema,
String tableName,
QueryWrapper queryWrapper)
根据 query 构建的条件来查询数据量
|
static Map |
selectFirstAndSecondColumnsAsMap(QueryWrapper queryWrapper)
根据 queryWrapper 查询内容,数据返回为Map 第一列的值作为key 第二列的值作为value
|
static Map |
selectFirstAndSecondColumnsAsMap(String sql,
Object... args)
查询某个内容,数据返回为Map 第一列的值作为key 第二列的值作为value
|
static Map |
selectFirstAndSecondColumnsAsMap(String tableName,
QueryWrapper queryWrapper)
根据 queryWrapper 查询内容,数据返回为Map 第一列的值作为key 第二列的值作为value
|
static Map |
selectFirstAndSecondColumnsAsMap(String schema,
String tableName,
QueryWrapper queryWrapper)
根据 queryWrapper 查询内容,数据返回为Map 第一列的值作为key 第二列的值作为value
|
static List<Row> |
selectListByCondition(String tableName,
QueryCondition condition)
通过 condition 条件来查询数据列表
|
static List<Row> |
selectListByCondition(String tableName,
QueryCondition condition,
Long count)
根据 condition 条件来查询数据列表
|
static List<Row> |
selectListByCondition(String schema,
String tableName,
QueryCondition condition)
通过 condition 条件来查询数据列表
|
static List<Row> |
selectListByCondition(String schema,
String tableName,
QueryCondition condition,
Long count)
根据 condition 条件来查询数据列表
|
static List<Row> |
selectListByMap(String tableName,
Map<String,Object> whereColumns)
通过 map 构建的条件来查询数据列表
|
static List<Row> |
selectListByMap(String tableName,
Map<String,Object> whereColumns,
Long count)
根据 map 构建的条件来查询数据列表
|
static List<Row> |
selectListByMap(String schema,
String tableName,
Map<String,Object> whereColumns)
通过 map 构建的条件来查询数据列表
|
static List<Row> |
selectListByMap(String schema,
String tableName,
Map<String,Object> whereColumns,
Long count)
根据 map 构建的条件来查询数据列表
|
static List<Row> |
selectListByQuery(QueryWrapper queryWrapper)
通过 query 来查询数据列表
|
static List<Row> |
selectListByQuery(String tableName,
QueryWrapper queryWrapper)
通过 query 来查询数据列表
|
static List<Row> |
selectListByQuery(String schema,
String tableName,
QueryWrapper queryWrapper)
通过 query 来查询数据列表
|
static List<Row> |
selectListBySql(String sql,
Object... args)
通过 sql 来查询多条数据
|
static Object |
selectObject(QueryWrapper queryWrapper)
根据 queryWrapper 查询内容,数据返回的应该只有 1 行 1 列
|
static Object |
selectObject(String sql,
Object... args)
查询某个内容,数据返回的应该只有 1 行 1 列
|
static Object |
selectObject(String tableName,
QueryWrapper queryWrapper)
根据 queryWrapper 查询内容,数据返回的应该只有 1 行 1 列
|
static Object |
selectObject(String schema,
String tableName,
QueryWrapper queryWrapper)
根据 queryWrapper 查询内容,数据返回的应该只有 1 行 1 列
|
static List<Object> |
selectObjectList(QueryWrapper queryWrapper)
根据 queryWrapper 查询内容,数据返回的应该只有 1 行 1 列
|
static List<Object> |
selectObjectList(String sql,
Object... args)
查询某列内容,数据返回应该有 多行 1 列
|
static List<Object> |
selectObjectList(String tableName,
QueryWrapper queryWrapper)
根据 queryWrapper 查询内容,数据返回的应该只有 1 行 1 列
|
static List<Object> |
selectObjectList(String schema,
String tableName,
QueryWrapper queryWrapper)
根据 queryWrapper 查询内容,数据返回的应该只有 1 行 1 列
|
static Row |
selectOneByCondition(String tableName,
QueryCondition condition)
根据 condition 来查询数据
|
static Row |
selectOneByCondition(String schema,
String tableName,
QueryCondition condition)
根据 condition 来查询数据
|
static Row |
selectOneById(String tableName,
Row row)
根据 id 来查询 1 条数据
|
static Row |
selectOneById(String tableName,
String primaryKey,
Object id)
根据主键来查询 1 条数据
|
static Row |
selectOneById(String schema,
String tableName,
Row row)
根据 id 来查询 1 条数据
|
static Row |
selectOneById(String schema,
String tableName,
String primaryKey,
Object id)
根据主键来查询 1 条数据
|
static Row |
selectOneByMap(String tableName,
Map whereColumns)
根据 map 来查询 1 条数据
|
static Row |
selectOneByMap(String schema,
String tableName,
Map whereColumns)
根据 map 来查询 1 条数据
|
static Row |
selectOneByQuery(QueryWrapper queryWrapper)
直接根据 queryWrapper 查询 1 条数据
|
static Row |
selectOneByQuery(String tableName,
QueryWrapper queryWrapper)
根据 queryWrapper 来查询 1 条数据
|
static Row |
selectOneByQuery(String schema,
String tableName,
QueryWrapper queryWrapper)
根据 queryWrapper 来查询 1 条数据
|
static Row |
selectOneBySql(String sql,
Object... args)
根据 sql 来查询 1 条数据
|
static boolean |
tx(Supplier<Boolean> supplier)
进行事务操作,返回 null 或者 false 或者 抛出异常,事务回滚
|
static boolean |
tx(Supplier<Boolean> supplier,
Propagation propagation)
进行事务操作,返回 null 或者 false 或者 抛出异常, 事务回滚
|
static <T> T |
txWithResult(Supplier<T> supplier)
进行事务操作,和返回结果无关,只有抛出异常时,事务回滚
|
static <T> T |
txWithResult(Supplier<T> supplier,
Propagation propagation)
进行事务操作,和返回结果无关,只有抛出异常时,事务回滚
|
static int[] |
updateBatch(String sql,
BatchArgsSetter batchArgsSetter) |
static int |
updateBatchById(String tableName,
List<Row> rows)
根据主键来批量更新数据
|
static int |
updateBatchById(String schema,
String tableName,
List<Row> rows)
根据主键来批量更新数据
|
static int |
updateByCondition(String tableName,
Row data,
QueryCondition condition)
根据 condition 来更新数据
|
static int |
updateByCondition(String schema,
String tableName,
Row data,
QueryCondition condition)
根据 condition 来更新数据
|
static int |
updateById(String tableName,
Row row)
根据 id 来更新数据
|
static int |
updateById(String schema,
String tableName,
Row row)
根据 id 来更新数据
|
static int |
updateByMap(String tableName,
Row data,
Map<String,Object> whereColumns)
根据 map 构建的条件来更新数据
|
static int |
updateByMap(String schema,
String tableName,
Row data,
Map<String,Object> whereColumns)
根据 map 构建的条件来更新数据
|
static int |
updateByQuery(String tableName,
Row data,
QueryWrapper queryWrapper)
根据 query 构建的条件来更新数据
|
static int |
updateByQuery(String schema,
String tableName,
Row data,
QueryWrapper queryWrapper)
根据 query 构建的条件来更新数据
|
static int |
updateBySql(String sql,
Object... args)
根据原生 sql 来更新数据
|
static <T> int |
updateEntitiesBatch(Collection<T> entities)
根据主键来批量更新数据
|
static <T> int |
updateEntitiesBatch(Collection<T> entities,
int batchSize)
根据主键来批量更新数据
|
public static RowMapperInvoker invoker()
public static RowMapperInvoker invoker(String environmentId)
public static int insert(String schema, String tableName, Row row)
schema - 模式tableName - 表名row - 数据public static int insert(String tableName, Row row)
tableName - 表名row - 数据public static int insertBySql(String sql, Object... args)
sql - sql 内容args - sql 参数public static int[] insertBatch(String schema, String tableName, Collection<Row> rows)
schema - 模式tableName - 表名rows - 数据public static int[] insertBatch(String tableName, Collection<Row> rows)
tableName - 表名rows - 数据public static int[] insertBatch(String schema, String tableName, Collection<Row> rows, int batchSize)
schema - 模式tableName - 表名rows - 数据batchSize - 每次提交的数据量public static int[] insertBatch(String tableName, Collection<Row> rows, int batchSize)
tableName - 表名rows - 数据batchSize - 每次提交的数据量public static int insertBatchWithFirstRowColumns(String schema, String tableName, List<Row> rows)
insertBatch(String, String, Collection, int) 高schema - 模式tableName - 表名rows - 数据public static int insertBatchWithFirstRowColumns(String tableName, List<Row> rows)
insertBatch(String, String, Collection, int) 高tableName - 表名rows - 数据public static int deleteBySql(String sql, Object... args)
sql - sql 内容args - 参数public static int deleteById(String schema, String tableName, Row row)
Row.ofKey(RowKey, Object) 来进行构建的schema - 模式tableName - 表名row - 主键 和 id值public static int deleteById(String tableName, Row row)
Row.ofKey(RowKey, Object) 来进行构建的tableName - 表名row - 主键 和 id值public static int deleteById(String schema, String tableName, String primaryKey, Object id)
schema - 模式tableName - 表名primaryKey - 主键字段名称id - 主键值public static int deleteById(String tableName, String primaryKey, Object id)
tableName - 表名primaryKey - 主键字段名称id - 主键值public static int deleteBatchByIds(String schema, String tableName, String primaryKey, Collection<?> ids)
schema - 模式tableName - 表名primaryKey - 主键字段名称ids - id 集合public static int deleteBatchByIds(String tableName, String primaryKey, Collection<?> ids)
tableName - 表名primaryKey - 主键字段名称ids - id 集合public static int deleteByMap(String schema, String tableName, Map<String,Object> whereColumns)
schema - 模式tableName - 表名whereColumns - where 条件public static int deleteByMap(String tableName, Map<String,Object> whereColumns)
tableName - 表名whereColumns - where 条件public static int deleteByCondition(String schema, String tableName, QueryCondition condition)
schema - 模式tableName - 表名condition - 条件内容public static int deleteByCondition(String tableName, QueryCondition condition)
tableName - 表名condition - 条件内容public static int deleteByQuery(String schema, String tableName, QueryWrapper queryWrapper)
schema - 模式tableName - 表名queryWrapper - querypublic static int deleteByQuery(String tableName, QueryWrapper queryWrapper)
tableName - 表名queryWrapper - querypublic static int updateBySql(String sql, Object... args)
sql - sql 内容args - sql 参数public static int[] updateBatch(String sql, BatchArgsSetter batchArgsSetter)
sql - batchArgsSetter - public static int updateById(String schema, String tableName, Row row)
schema - 模式tableName - 表名row - id 及其内容public static int updateById(String tableName, Row row)
tableName - 表名row - id 及其内容public static int updateByMap(String schema, String tableName, Row data, Map<String,Object> whereColumns)
schema - 模式tableName - 表名data - 数据内容whereColumns - where 条件public static int updateByMap(String tableName, Row data, Map<String,Object> whereColumns)
tableName - 表名data - 数据内容whereColumns - where 条件public static int updateByCondition(String schema, String tableName, Row data, QueryCondition condition)
schema - 模式tableName - 表名data - 数据condition - 条件public static int updateByCondition(String tableName, Row data, QueryCondition condition)
tableName - 表名data - 数据condition - 条件public static int updateByQuery(String schema, String tableName, Row data, QueryWrapper queryWrapper)
schema - 模式tableName - 表名data - 数据内容queryWrapper - queryWrapper 条件public static int updateByQuery(String tableName, Row data, QueryWrapper queryWrapper)
tableName - 表名data - 数据内容queryWrapper - queryWrapper 条件public static int updateBatchById(String schema, String tableName, List<Row> rows)
schema - 模式tableName - 表名rows - 还有主键的数据public static int updateBatchById(String tableName, List<Row> rows)
tableName - 表名rows - 还有主键的数据public static <T> int updateEntitiesBatch(Collection<T> entities, int batchSize)
entities - 实体batchSize - 批次大小public static <T> int updateEntitiesBatch(Collection<T> entities)
entities - 实体public static <M> int[] executeBatch(int totalSize,
int batchSize,
Class<M> mapperClass,
BiConsumer<M,Integer> consumer)
M - MappertotalSize - 执行总量batchSize - 每一批次的数据量mapperClass - 通过那个 Mapper 来执行consumer - 执行内容public static <M,D> int[] executeBatch(Collection<D> datas, Class<M> mapperClass, BiConsumer<M,D> consumer)
M - mapperD - 数据类型datas - 数据mapperClass - mapper 类consumer - 消费者public static <M,E> int[] executeBatch(Collection<E> datas, int batchSize, Class<M> mapperClass, BiConsumer<M,E> consumer)
M - mapperE - 数据类型datas - 数据batchSize - 每批次执行多少条mapperClass - mapper 类consumer - 消费者public static Row selectOneBySql(String sql, Object... args)
sql - sql 内容args - sql 参数public static Row selectOneById(String schema, String tableName, Row row)
schema - 模式tableName - 表名row - 主键和 id 值public static Row selectOneById(String tableName, Row row)
tableName - 表名row - 主键和 id 值public static Row selectOneById(String schema, String tableName, String primaryKey, Object id)
schema - 模式tableName - 表名primaryKey - 主键字段名称id - 主键值public static Row selectOneById(String tableName, String primaryKey, Object id)
tableName - 表名primaryKey - 主键字段名称id - 主键值public static Row selectOneByMap(String schema, String tableName, Map whereColumns)
schema - 模式tableName - 表名whereColumns - where条件public static Row selectOneByMap(String tableName, Map whereColumns)
tableName - 表名whereColumns - where条件public static Row selectOneByCondition(String schema, String tableName, QueryCondition condition)
schema - 模式tableName - 表名condition - 条件public static Row selectOneByCondition(String tableName, QueryCondition condition)
tableName - 表名condition - 条件public static Row selectOneByQuery(String schema, String tableName, QueryWrapper queryWrapper)
schema - 模式tableName - 表名queryWrapper - queryWrapperpublic static Row selectOneByQuery(String tableName, QueryWrapper queryWrapper)
tableName - 表名queryWrapper - queryWrapperpublic static Row selectOneByQuery(QueryWrapper queryWrapper)
queryWrapper - 必须带有 from 的 queryWrapperpublic static List<Row> selectListBySql(String sql, Object... args)
sql - sql 内容args - sql 参数public static List<Row> selectListByMap(String schema, String tableName, Map<String,Object> whereColumns)
schema - 模式tableName - 表名whereColumns - where 条件public static List<Row> selectListByMap(String tableName, Map<String,Object> whereColumns)
tableName - 表名whereColumns - where 条件public static List<Row> selectListByMap(String schema, String tableName, Map<String,Object> whereColumns, Long count)
schema - 模式tableName - 表名whereColumns - 条件count - 数据量public static List<Row> selectListByMap(String tableName, Map<String,Object> whereColumns, Long count)
tableName - 表名whereColumns - 条件count - 数据量public static List<Row> selectListByCondition(String schema, String tableName, QueryCondition condition)
schema - 模式tableName - 表名condition - where 条件public static List<Row> selectListByCondition(String tableName, QueryCondition condition)
tableName - 表名condition - where 条件public static List<Row> selectListByCondition(String schema, String tableName, QueryCondition condition, Long count)
schema - 模式tableName - 表名condition - 条件count - 数据量public static List<Row> selectListByCondition(String tableName, QueryCondition condition, Long count)
tableName - 表名condition - 条件count - 数据量public static List<Row> selectListByQuery(String schema, String tableName, QueryWrapper queryWrapper)
schema - 模式tableName - 表名queryWrapper - query 条件public static List<Row> selectListByQuery(String tableName, QueryWrapper queryWrapper)
tableName - 表名queryWrapper - query 条件public static List<Row> selectListByQuery(QueryWrapper queryWrapper)
queryWrapper - 必须带有 from 的 queryWrapperpublic static List<Row> selectAll(String schema, String tableName)
schema - 模式tableName - 表名public static Object selectObject(String sql, Object... args)
sql - sql 内容args - sql 参数public static Object selectObject(String schema, String tableName, QueryWrapper queryWrapper)
schema - 模式tableName - 表名queryWrapper - query 封装public static Object selectObject(String tableName, QueryWrapper queryWrapper)
tableName - 表名queryWrapper - query 封装public static Object selectObject(QueryWrapper queryWrapper)
queryWrapper - query 封装public static Map selectFirstAndSecondColumnsAsMap(QueryWrapper queryWrapper)
queryWrapper - query 封装public static Map selectFirstAndSecondColumnsAsMap(String sql, Object... args)
sql - sql 内容args - sql 参数public static Map selectFirstAndSecondColumnsAsMap(String schema, String tableName, QueryWrapper queryWrapper)
schema - 模式tableName - 表名queryWrapper - query 封装public static Map selectFirstAndSecondColumnsAsMap(String tableName, QueryWrapper queryWrapper)
tableName - 表名queryWrapper - query 封装public static List<Object> selectObjectList(String sql, Object... args)
sql - sql 内容args - sql 参数public static List<Object> selectObjectList(String schema, String tableName, QueryWrapper queryWrapper)
schema - 模式tableName - 表名queryWrapper - query 封装public static List<Object> selectObjectList(String tableName, QueryWrapper queryWrapper)
tableName - 表名queryWrapper - query 封装public static List<Object> selectObjectList(QueryWrapper queryWrapper)
queryWrapper - query 封装public static long selectCount(String sql, Object... args)
sql - sql 内容args - sql 参数public static long selectCountByCondition(String schema, String tableName, QueryCondition condition)
schema - 模式tableName - 表名condition - 条件public static long selectCountByCondition(String tableName, QueryCondition condition)
tableName - 表名condition - 条件public static long selectCountByQuery(String schema, String tableName, QueryWrapper queryWrapper)
schema - 模式tableName - 表名queryWrapper - query 条件public static long selectCountByQuery(String tableName, QueryWrapper queryWrapper)
tableName - 表名queryWrapper - query 条件public static long selectCountByQuery(QueryWrapper queryWrapper)
queryWrapper - 必须带有表名的 queryWrapperpublic static Page<Row> paginate(String schema, String tableName, Number pageNumber, Number pageSize, QueryCondition condition)
schema - 模式tableName - 表名pageNumber - 当前的页码pageSize - 每页的数据量condition - 条件public static Page<Row> paginate(String tableName, Number pageNumber, Number pageSize, QueryCondition condition)
tableName - 表名pageNumber - 当前的页码pageSize - 每页的数据量condition - 条件public static Page<Row> paginate(String schema, String tableName, Number pageNumber, Number pageSize, Number totalRow, QueryCondition condition)
schema - 模式tableName - 表名pageNumber - 当前的页码pageSize - 每页的数据量totalRow - 数据总量condition - 条件public static Page<Row> paginate(String tableName, Number pageNumber, Number pageSize, Number totalRow, QueryCondition condition)
tableName - 表名pageNumber - 当前的页码pageSize - 每页的数据量totalRow - 数据总量condition - 条件public static Page<Row> paginate(String schema, String tableName, Number pageNumber, Number pageSize, QueryWrapper queryWrapper)
schema - 模式tableName - 表名pageNumber - 当前的页码pageSize - 每页的数据量queryWrapper - 条件public static Page<Row> paginate(String tableName, Number pageNumber, Number pageSize, QueryWrapper queryWrapper)
tableName - 表名pageNumber - 当前的页码pageSize - 每页的数据量queryWrapper - 条件public static Page<Row> paginate(String schema, String tableName, Number pageNumber, Number pageSize, Number totalRow, QueryWrapper queryWrapper)
schema - 模式tableName - 表名pageNumber - 当前的页码pageSize - 每页的数据量totalRow - 数据总量queryWrapper - 条件public static Page<Row> paginate(String tableName, Number pageNumber, Number pageSize, Number totalRow, QueryWrapper queryWrapper)
tableName - 表名pageNumber - 当前的页码pageSize - 每页的数据量totalRow - 数据总量queryWrapper - 条件public static Page<Row> paginate(String schema, String tableName, Page<Row> page, QueryWrapper queryWrapper)
schema - 模式tableName - 表名page - page 对象,若 page 有 totalCount 值,则不会再去查询分类的数据总量queryWrapper - 条件public static Page<Row> paginate(String tableName, Page<Row> page, QueryWrapper queryWrapper)
tableName - 表名page - page 对象,若 page 有 totalCount 值,则不会再去查询分类的数据总量queryWrapper - 条件public static boolean tx(Supplier<Boolean> supplier, Propagation propagation)
public static <T> T txWithResult(Supplier<T> supplier)
public static <T> T txWithResult(Supplier<T> supplier, Propagation propagation)
Copyright © 2024. All rights reserved.