forked from qt-creator/qt-creator
Clang: Add busy timeout handler to database
You use now a busy timeout of one second. This is preventing the throwing of a exception for a busy time under one second. Change-Id: Iae800a525ad009b594c29883ffb243c1be8b3874 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
|
||||
#include <utils/smallstringvector.h>
|
||||
|
||||
#include <chrono>
|
||||
|
||||
struct sqlite3;
|
||||
|
||||
namespace Sqlite {
|
||||
@@ -81,6 +83,8 @@ public:
|
||||
|
||||
static int openMode(OpenMode);
|
||||
|
||||
void setBusyTimeout(std::chrono::milliseconds timeout);
|
||||
|
||||
protected:
|
||||
bool databaseIsOpen() const;
|
||||
|
||||
@@ -105,6 +109,7 @@ protected:
|
||||
void checkInitializeSqliteLibraryWasSuccesful(int resultCode);
|
||||
void checkShutdownSqliteLibraryWasSuccesful(int resultCode);
|
||||
void checkIfLogCouldBeCheckpointed(int resultCode);
|
||||
void checkIfBusyTimeoutWasSet(int resultCode);
|
||||
|
||||
static Utils::SmallStringView journalModeToPragma(JournalMode journalMode);
|
||||
static JournalMode pragmaToJournalMode(Utils::SmallStringView pragma);
|
||||
|
||||
Reference in New Issue
Block a user