AnyDatabaseReader
public final class AnyDatabaseReader : DatabaseReader
A type-erased DatabaseReader
Instances of AnyDatabaseReader forward their methods to an arbitrary underlying database reader.
-
Creates a database reader that wraps a base database reader.
Declaration
Swift
public init(_ base: DatabaseReader)
-
Declaration
Swift
public var configuration: Configuration { get }
-
Declaration
Swift
public func close() throws
-
Declaration
Swift
public func interrupt()
-
Declaration
Swift
@_disfavoredOverload public func read<T>(_ value: (Database) throws -> T) throws -> T
-
Declaration
Swift
public func asyncRead(_ value: @escaping (Result<Database, Error>) -> Void)
-
Declaration
Swift
@_disfavoredOverload public func unsafeRead<T>(_ value: (Database) throws -> T) throws -> T
-
Declaration
Swift
public func asyncUnsafeRead(_ value: @escaping (Result<Database, Error>) -> Void)
-
Declaration
Swift
public func unsafeReentrantRead<T>(_ value: (Database) throws -> T) throws -> T