@Service public class BackupInfoService extends BaseDbService<BackupInfoModel>
key, tableName, tClass
Constructor and Description |
---|
BackupInfoService(DbExtConfig dbExtConfig) |
Modifier and Type | Method and Description |
---|---|
Future<BackupInfoModel> |
autoBackup()
自动备份
|
Future<BackupInfoModel> |
backupToSql(List<String> tableNameList)
备份数据库 SQL 文件
|
void |
checkAutoBackup()
检查数据库备份
|
int |
delByKey(String keyValue)
根据主键生成
|
List<String> |
h2TableNameList()
load table name list from h2 database
|
boolean |
restoreWithSql(String backupSqlPath)
根据 SQL 文件还原数据库
还原数据库时只能同步,防止该过程中修改数据造成数据不一致
|
autoClear, autoLoopClear, clearTimeColumns, count, count, covetTableName, defaultOrders, executeClearImpl, fillInsert, getData, getLastTimeValue, insert, insert, insertNotFill, list, listById, listById, listPage, listPage, listPage, parsePage, update, updateById, updateById, upsert
count, count, dataBeanToEntity, del, delByKey, entityToBean, entityToBean, entityToBeanList, execute, exists, exists, fillSelectResult, findByCondition, getByKey, getByKey, getByKey, getKey, getTableName, insert, listByBean, listByEntity, listPageOnlyResult, query, query, queryByBean, queryList, queryList, queryList, update, warpException
public BackupInfoService(DbExtConfig dbExtConfig)
public void checkAutoBackup()
public Future<BackupInfoModel> autoBackup()
public Future<BackupInfoModel> backupToSql(List<String> tableNameList)
tableNameList
- 需要备份的表名称列表,如果是全库备份,则不需要public boolean restoreWithSql(String backupSqlPath)
backupSqlPath
- 备份 sql 文件地址public List<String> h2TableNameList()
public int delByKey(String keyValue)
BaseDbCommonService
delByKey
in class BaseDbCommonService<BackupInfoModel>
keyValue
- 主键值Copyright © 2017–2022. All rights reserved.