JournalModeConfiguration
Defines how the journal mode is configured when the database connection is opened.
enum JournalModeConfiguration
Related SQLite documentation: https://www.sqlite.org/pragma.html#pragma_journal_mode
Defines how the journal mode is configured when the database connection is opened.
enum JournalModeConfiguration
Related SQLite documentation: https://www.sqlite.org/pragma.html#pragma_journal_mode
import GRDB
A toolkit for SQLite databases, with a focus on application development
struct Configuration
The configuration of a database connection.
case `default`
The default setup has DatabaseQueue
perform no specific configuration of the journal mode, and DatabasePool
configure the database for the WAL mode (just like the wal
case).
case wal
The journal mode is set to WAL (plus extra configurations that make life easier with WAL databases).
var acceptsDoubleQuotedStringLiterals: Bool
A boolean value indicating whether SQLite 3.29+ interprets double-quoted strings as string literals when they does not match any valid identifier.
var busyMode: Database.BusyMode
Defines the how SQLITE_BUSY
errors are handled.
var foreignKeysEnabled: Bool
A boolean value indicating whether foreign key support is enabled.
var journalMode: Configuration.JournalModeConfiguration
Defines how the journal mode is configured when the database connection is opened.
var readonly: Bool
A boolean value indicating whether an SQLite connection is read-only.
init()
Creates a factory configuration.
var allowsUnsafeTransactions: Bool
A boolean value indicating whether it is valid to leave a transaction opened at the end of a database access method.
var label: String?
A label that describes a database connection.
var maximumReaderCount: Int
The maximum number of concurrent reader connections.
var observesSuspensionNotifications: Bool
A boolean value indicating whether the database connection listens to the suspendNotification
and resumeNotification
notifications.
var persistentReadOnlyConnections: Bool
A boolean value indicating whether read-only connections should be kept open.
var publicStatementArguments: Bool
A boolean value indicating whether statement arguments are visible in the description of database errors and trace events.
var qos: DispatchQoS
The quality of service of database accesses.
var readQoS: DispatchQoS { get }
The effective quality of service of read-only database accesses.
var targetQueue: DispatchQueue?
The target dispatch queue for database accesses.
var transactionClock: any TransactionClock
The clock that feeds transactionDate
.
var writeQoS: DispatchQoS { get }
The effective quality of service of write database accesses.
var writeTargetQueue: DispatchQueue?
The target dispatch queue for write database accesses.
mutating func prepareDatabase(_ setup: @escaping (Database) throws -> Void)
Defines a function to run whenever an SQLite connection is opened.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.