diff options
Diffstat (limited to 'SQLiteStudio3/coreSQLiteStudio/db/abstractdb.h')
| -rw-r--r-- | SQLiteStudio3/coreSQLiteStudio/db/abstractdb.h | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/SQLiteStudio3/coreSQLiteStudio/db/abstractdb.h b/SQLiteStudio3/coreSQLiteStudio/db/abstractdb.h index a465679..193f173 100644 --- a/SQLiteStudio3/coreSQLiteStudio/db/abstractdb.h +++ b/SQLiteStudio3/coreSQLiteStudio/db/abstractdb.h @@ -203,6 +203,8 @@ class API_EXPORT AbstractDb : public Db virtual void initAfterOpen(); + virtual bool flushWalInternal() = 0; + void checkForDroppedObject(const QString& query); bool registerCollation(const QString& name); bool deregisterCollation(const QString& name); @@ -341,6 +343,16 @@ class API_EXPORT AbstractDb : public Db * @brief Function type. */ FunctionManager::ScriptFunction::Type type; + + /** + * @brief The deterministic flag used for function registration. + */ + bool deterministic; + + /** + * @brief Flag indicating if this function is SQLiteStudio's built-in function or user's custom function. + */ + bool builtIn = false; }; friend int qHash(const AbstractDb::RegisteredFunction& fn); @@ -415,6 +427,23 @@ class API_EXPORT AbstractDb : public Db void registerFunction(const RegisteredFunction& function); /** + * @brief Flushes any pending WAL log files into the db file. + * + * It actually makes a 'PRAGMA wal_checkpoint(FULL)' call on the database. + * It's called automatically upon closing the database. + */ + void flushWal(); + + /** + * @brief Registers SQLiteStudio's built-in functions in the db. + * + * This function is called once during opening the db. + * + * @see FunctionManager + */ + void registerBuiltInFunctions(); + + /** * @brief Connection state lock. * * It's locked whenever the connection state is changed or tested. @@ -457,14 +486,16 @@ class API_EXPORT AbstractDb : public Db */ void asyncQueryFinished(AsyncQueryRunner* runner); + void appIsAboutToQuit(); + public slots: bool open(); bool close(); bool openQuiet(); bool closeQuiet(); bool openForProbing(); - void registerAllFunctions(); - void registerAllCollations(); + void registerUserFunctions(); + void registerUserCollations(); void reloadExtensions(); }; |
