AnyDatabaseWriter
public final class AnyDatabaseWriter : DatabaseWriter
A type-erased DatabaseWriter
Instances of AnyDatabaseWriter forward their methods to an arbitrary underlying database writer.
-
Creates a database writer that wraps a base database writer.
Declaration
Swift
public init(_ base: DatabaseWriter)
-
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
-
Declaration
Swift
public func concurrentRead<T>(_ value: @escaping (Database) throws -> T) -> DatabaseFuture<T>
-
Declaration
Swift
@_disfavoredOverload public func write<T>(_ updates: (Database) throws -> T) throws -> T
-
Declaration
Swift
@_disfavoredOverload public func writeWithoutTransaction<T>(_ updates: (Database) throws -> T) rethrows -> T
-
Declaration
Swift
@_disfavoredOverload public func barrierWriteWithoutTransaction<T>(_ updates: (Database) throws -> T) rethrows -> T
-
Declaration
Swift
public func asyncBarrierWriteWithoutTransaction(_ updates: @escaping (Database) -> Void)
-
Declaration
-
Declaration
Swift
public func asyncWriteWithoutTransaction(_ updates: @escaping (Database) -> Void)
-
Declaration
Swift
public func unsafeReentrantWrite<T>(_ updates: (Database) throws -> T) rethrows -> T