| 1 | // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/database/sqlitedriver.h`/ |
| 2 | |
| 3 | #ifndef SQLITEDRIVER_H |
| 4 | #define SQLITEDRIVER_Hcxx . . $ `src/librssguard/database/sqlitedriver.h:4:9`! |
| 5 | |
| 6 | #include "database/databasedriver.h"cxx . . $ `<file>/src/librssguard/database/databasedriver.h`/ |
| 7 | |
| 8 | #if defined(SYSTEM_SQLITE3cxx . . $ `<built-in>:527:9`!) |
| 9 | #include <sqlite3.h> |
| 10 | #else |
| 11 | #include "3rd-party/sqlite/sqlite3.h" |
| 12 | #endif |
| 13 | |
| 14 | class SqliteDrivercxx . . $ SqliteDriver# : public DatabaseDrivercxx . . $ DatabaseDriver# { |
| 15 | Q_OBJECTcxx . . $ SqliteDriver#tr(75d9f1c324b4579d). |
| 16 | |
| 17 | public: |
| 18 | explicit SqliteDrivercxx . . $ SqliteDriver#SqliteDriver(3238410c7ce5dc54).(bool in_memory, QObjectcxx . . $ QObject#* parent = nullptr); |
| 19 | |
| 20 | virtual QStringcxx . . $ QString# locationcxx . . $ SqliteDriver#location(6ef7b6c27b00b43d).() const; |
| 21 | virtual DriverTypecxx . . $ DatabaseDriver#DriverType# driverTypecxx . . $ SqliteDriver#driverType(2f4784d5e94eaa66).() const; |
| 22 | virtual bool vacuumDatabasecxx . . $ SqliteDriver#vacuumDatabase(c9857a73d68e59ba).(); |
| 23 | virtual QStringcxx . . $ QString# ddlFilePrefixcxx . . $ SqliteDriver#ddlFilePrefix(6ef7b6c27b00b43d).() const; |
| 24 | virtual bool saveDatabasecxx . . $ SqliteDriver#saveDatabase(c9857a73d68e59ba).(); |
| 25 | virtual bool initiateRestorationcxx . . $ SqliteDriver#initiateRestoration(e1defb592416720d).(const QStringcxx . . $ QString#& database_package_file); |
| 26 | virtual bool finishRestorationcxx . . $ SqliteDriver#finishRestoration(c9857a73d68e59ba).(); |
| 27 | virtual QSqlDatabasecxx . . $ QSqlDatabase# connectioncxx . . $ SqliteDriver#connection(32d6d64cc6e35a97).(const QStringcxx . . $ QString#& connection_name, |
| 28 | DatabaseDrivercxx . . $ DatabaseDriver#::DesiredStorageTypecxx . . $ DatabaseDriver#DesiredStorageType# desired_type = |
| 29 | DatabaseDrivercxx . . $ DatabaseDriver#::DesiredStorageTypecxx . . $ DatabaseDriver#DesiredStorageType#::FromSettingscxx . . $ DatabaseDriver#DesiredStorageType#FromSettings.); |
| 30 | virtual qint64cxx . . $ qint64# databaseDataSizecxx . . $ SqliteDriver#databaseDataSize(a5d9f2bf8849668d).(); |
| 31 | virtual QStringcxx . . $ QString# humanDriverTypecxx . . $ SqliteDriver#humanDriverType(6ef7b6c27b00b43d).() const; |
| 32 | virtual QStringcxx . . $ QString# qtDriverCodecxx . . $ SqliteDriver#qtDriverCode(6ef7b6c27b00b43d).() const; |
| 33 | virtual void backupDatabasecxx . . $ SqliteDriver#backupDatabase(c1427772cd1877b0).(const QStringcxx . . $ QString#& backup_folder, const QStringcxx . . $ QString#& backup_name); |
| 34 | virtual QStringcxx . . $ QString# autoIncrementPrimaryKeycxx . . $ SqliteDriver#autoIncrementPrimaryKey(6ef7b6c27b00b43d).() const; |
| 35 | virtual QStringcxx . . $ QString# blobcxx . . $ SqliteDriver#blob(6ef7b6c27b00b43d).() const; |
| 36 | virtual QStringcxx . . $ QString# textcxx . . $ SqliteDriver#text(6ef7b6c27b00b43d).() const; |
| 37 | |
| 38 | private: |
| 39 | QSqlDatabasecxx . . $ QSqlDatabase# initializeDatabasecxx . . $ SqliteDriver#initializeDatabase(798f65c2bb0fade).(const QStringcxx . . $ QString#& connection_name, bool in_memory); |
| 40 | void setPragmascxx . . $ SqliteDriver#setPragmas(81e83dc7d107a009).(QSqlQuerycxx . . $ QSqlQuery#& query); |
| 41 | QStringcxx . . $ QString# databaseFilePathcxx . . $ SqliteDriver#databaseFilePath(6ef7b6c27b00b43d).() const; |
| 42 | |
| 43 | // Uses native "sqlite3" handle to save or load in-memory DB from/to file. |
| 44 | int loadOrSaveDbInMemoryDbcxx . . $ SqliteDriver#loadOrSaveDbInMemoryDb(a00ea6425b54fb74).(sqlite3* in_memory_db, const char* db_filename, bool save); |
| 45 | |
| 46 | private: |
| 47 | bool m_inMemoryDatabasecxx . . $ SqliteDriver#m_inMemoryDatabase.; |
| 48 | QStringcxx . . $ QString# m_databaseFilePathcxx . . $ SqliteDriver#m_databaseFilePath.; |
| 49 | bool m_fileBasedDatabaseInitializedcxx . . $ SqliteDriver#m_fileBasedDatabaseInitialized.; |
| 50 | bool m_inMemoryDatabaseInitializedcxx . . $ SqliteDriver#m_inMemoryDatabaseInitialized.; |
| 51 | }; |
| 52 | |
| 53 | #endif // SQLITEDRIVER_H |