path
The path to the database file.
var path: String { get }
In-memory databases also have a path: see In-Memory Databases.
The path to the database file.
var path: String { get }
In-memory databases also have a path: see In-Memory Databases.
import GRDB
A toolkit for SQLite databases, with a focus on application development
protocol DatabaseReader : AnyObject, Sendable
A type that reads from an SQLite database.
@frozen struct String
A Unicode string value that is a collection of characters.
var configuration: Configuration { get }
The database configuration.
func _add<Reducer>(observation: ValueObservation<Reducer>, scheduling scheduler: some ValueObservationScheduler, onChange: @escaping (Reducer.Value) -> Void) -> AnyDatabaseCancellable where Reducer : ValueReducer
Starts a value observation.
func asyncRead(_ value: @escaping (Result<Database, Error>) -> Void)
Schedules read-only database operations for execution, and returns immediately.
func asyncUnsafeRead(_ value: @escaping (Result<Database, Error>) -> Void)
Schedules database operations for execution, and returns immediately.
func close() throws
Closes the database connection.
func interrupt()
Causes any pending database operation to abort and return at its earliest opportunity.
func read<T>(_ value: (Database) throws -> T) throws -> T
Executes read-only database operations, and returns their result after they have finished executing.
func read<T>(_ value: @escaping (Database) throws -> T) async throws -> T where T : Sendable
Executes read-only database operations, and returns their result after they have finished executing.
func unsafeRead<T>(_ value: (Database) throws -> T) throws -> T
Executes database operations, and returns their result after they have finished executing.
func unsafeRead<T>(_ value: @escaping (Database) throws -> T) async throws -> T where T : Sendable
Executes database operations, and returns their result after they have finished executing.
func unsafeReentrantRead<T>(_ value: (Database) throws -> T) throws -> T
Executes database operations, and returns their result after they have finished executing.