You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWATI/Include/mData/mProjectManager/ZxModuleUpdater.h

50 lines
1.2 KiB
C

#pragma once
#include "Defines.h"
#include "mProjectManager_global.h"
// 数据库版本升级
class M_PROJECTMANAGER_EXPORT ZxModuleUpdater
{
public:
ZxModuleUpdater();
virtual ~ZxModuleUpdater();
public:
// 遍历版本历史
// 注map已经默认按照Ver排序了
// map[0] [20170921 ... V1.0]
// map[1] [20171016 ... V1.01]
// map[2] [20171025 ... V1.02]
// map[3] [20171225 ... V1.03]
// map[4] [20180517 ... V1.04]
bool parseVerRecords(QString sOld, \
QString sNew, \
QMap<QString, QStringList>& map, \
QString& sError);
// 执行Sql更新
bool executeDbSqls(QStringList& listSqls, \
bool bProjMode, \
QString &sError);
// 文件工区版本更新
bool updateProjVer(QString sNew, \
bool bProjMode,
QString &sError);
// 文件工区版本获取
bool getProjVer(QString& sVer, \
bool bProjMode, \
QString &sError);
private:
// 内部处理Sql的存储
void appendTempSql(QStringList& listSqls,
QStringList& listTemps);
};