Instance Methodgrdb 7.3.0GRDB
asyncRead(_:)
DatabaseReader.swift:660func asyncRead(_ value: @escaping (Result<Database, Error>) -> Void)
func asyncRead(_ value: @escaping (Result<Database, Error>) -> Void)
s4GRDB17AnyDatabaseReaderC9asyncReadyyys6ResultOyAA0C0Cs5Error_pGYbcF
What are these?412JF
import GRDB
A toolkit for SQLite databases, with a focus on application development
final class AnyDatabaseReader
A type-erased database reader.
@frozen enum Result<Success, Failure> where Failure : Error, Success : ~Copyable
A value that represents either a success or a failure, including an associated value in each case.
final class Database
An SQLite connection.
protocol Error : Sendable
A type representing an error value that can be thrown.
typealias Void = ()
The return type of functions that don’t explicitly specify a return type, that is, an empty tuple ()
.
init(_ base: any DatabaseReader)
Creates a new database reader that wraps and forwards operations to base
.
var configuration: Configuration { get }
var path: String { get }
func _add<Reducer>(observation: ValueObservation<Reducer>, scheduling scheduler: some ValueObservationScheduler, onChange: @escaping (Reducer.Value) -> Void) -> AnyDatabaseCancellable where Reducer : ValueReducer
func asyncUnsafeRead(_ value: @escaping (Result<Database, Error>) -> Void)
func close() throws
func interrupt()
func read<T>(_ value: (Database) throws -> T) throws -> T
func read<T>(_ value: @escaping (Database) throws -> T) async throws -> T where T : Sendable
func unsafeRead<T>(_ value: (Database) throws -> T) throws -> T
func unsafeRead<T>(_ value: @escaping (Database) throws -> T) async throws -> T where T : Sendable
func unsafeReentrantRead<T>(_ value: (Database) throws -> T) throws -> T