foreignKeysEnabled
A boolean value indicating whether foreign key support is enabled.
var foreignKeysEnabled: Bool
The default is true.
Related SQLite documentation: https://www.sqlite.org/foreignkeys.html.
A boolean value indicating whether foreign key support is enabled.
var foreignKeysEnabled: Bool
The default is true.
Related SQLite documentation: https://www.sqlite.org/foreignkeys.html.
import GRDB
A toolkit for SQLite databases, with a focus on application development
struct Configuration
The configuration of a database connection.
@frozen struct Bool
A value type whose instances are either true
or false
.
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 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.
enum JournalModeConfiguration
Defines how the journal mode is configured when the database connection is opened.
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.