data: Saving application version to storage and refresh when version changes
The version string of the application is stored on every parse. The utility class Version is used to parse the version string and compare application and stored string. The third number in the version string is now the storage refresh number, the project will be refreshed when it changes. (0.2.1 -> 0.2.2)
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "data/StorageTypes.h"
|
||||
|
||||
class TextAccess;
|
||||
class Version;
|
||||
|
||||
class SqliteStorage
|
||||
{
|
||||
@@ -29,6 +30,9 @@ public:
|
||||
void commitTransaction();
|
||||
void rollbackTransaction();
|
||||
|
||||
Version getVersion() const;
|
||||
void setVersion(const Version& version);
|
||||
|
||||
Id addEdge(int type, Id sourceNodeId, Id targetNodeId);
|
||||
Id addNode(int type, Id nameId, bool defined);
|
||||
Id addFile(Id nameId, const std::string& filePath, const std::string& modificationTime);
|
||||
@@ -107,6 +111,11 @@ private:
|
||||
void clearTables();
|
||||
void setupTables();
|
||||
|
||||
bool hasTable(const std::string& tableName) const;
|
||||
|
||||
std::string getMetaValue(const std::string& key) const;
|
||||
void insertOrUpdateMetaValue(const std::string& key, const std::string& value);
|
||||
|
||||
StorageFile getFirstFile(const std::string& query) const;
|
||||
std::vector<StorageFile> getAllFiles(const std::string& query) const;
|
||||
StorageSourceLocation getFirstSourceLocation(const std::string& query) const;
|
||||
|
||||
Reference in New Issue
Block a user