Read-Only Configuration-Database support (#1046)

This commit is contained in:
LordGrey
2020-11-01 19:47:30 +01:00
committed by GitHub
parent 85a55de28c
commit bb652ade36
35 changed files with 268 additions and 90 deletions

View File

@@ -119,6 +119,13 @@ public:
///
bool deleteTable(const QString& table) const;
///
/// @brief Sets a table in read-only mode.
/// Updates will not written to the table
/// @param[in] readOnly True read-only, false - read/write
///
void setReadonlyMode(bool readOnly) { _readonlyMode = readOnly; };
private:
Logger* _log;
@@ -127,6 +134,8 @@ private:
/// table in database
QString _table;
bool _readonlyMode;
/// addBindValue to query given by QVariantList
void doAddBindValue(QSqlQuery& query, const QVariantList& variants) const;
};