Lightweight 0.20261023.0
Loading...
Searching...
No Matches
Lightweight::SqliteConnectionSettings Struct Reference

Connection-level settings applied when a connection to a SQLite database is established. More...

#include <SqlConnection.hpp>

Public Member Functions

bool operator== (SqliteConnectionSettings const &) const noexcept=default
 Equality comparison operator.
 

Public Attributes

std::chrono::milliseconds busyTimeout = SqliteBusyTimeoutDefault
 How long a statement waits on a locked database file before failing, applied via PRAGMA busy_timeout.
 
SqliteJournalMode journalMode = SqliteJournalMode::Unchanged
 The journal mode to switch the database to, see SqliteJournalMode.
 

Detailed Description

Connection-level settings applied when a connection to a SQLite database is established.

Inert on every other backend: no statement is issued for them there. The defaults reproduce the behaviour Lightweight has always had, a 60 second busy timeout and an untouched journal mode.

See also
SqlConnection::SetDefaultSqliteSettings, SqlConnection::SetSqliteSettings

Definition at line 118 of file SqlConnection.hpp.

Member Data Documentation

◆ busyTimeout

std::chrono::milliseconds Lightweight::SqliteConnectionSettings::busyTimeout = SqliteBusyTimeoutDefault

How long a statement waits on a locked database file before failing, applied via PRAGMA busy_timeout.

Zero disables the wait, so a contended statement fails at once; a negative value is treated as zero. Not to be confused with the ODBC login timeout of the connection string.

Definition at line 125 of file SqlConnection.hpp.

◆ journalMode

SqliteJournalMode Lightweight::SqliteConnectionSettings::journalMode = SqliteJournalMode::Unchanged

The journal mode to switch the database to, see SqliteJournalMode.

Definition at line 128 of file SqlConnection.hpp.


The documentation for this struct was generated from the following file: