diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h --- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h +++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h @@ -24,16 +24,10 @@ class SQLiteQueryExecutor : public DatabaseQueryExecutor { static void migrate(); - static sqlite3 *getConnection(); static void closeConnection(); - static std::string backupLogDataKey; - #ifndef EMSCRIPTEN - static NativeSQLiteConnectionManager connectionManager; void cleanupDatabaseExceptAllowlist(sqlite3 *db) const; -#else - static WebSQLiteConnectionManager connectionManager; #endif std::optional getSyncedDatabaseVersion(sqlite3 *db) const; @@ -49,6 +43,13 @@ public: static std::string sqliteFilePath; static std::string backupDataKey; + static std::string backupLogDataKey; + +#ifndef EMSCRIPTEN + static NativeSQLiteConnectionManager connectionManager; +#else + static WebSQLiteConnectionManager connectionManager; +#endif // Constant key sizes static int backupDataKeySize; @@ -57,6 +58,9 @@ SQLiteQueryExecutor(); ~SQLiteQueryExecutor(); SQLiteQueryExecutor(std::string sqliteFilePath); + + static sqlite3 *getConnection(); + std::unique_ptr getThread(std::string threadID) const override; std::string getDraft(std::string key) const override; void updateDraft(std::string key, std::string text) const override;