AnyTypedRequest
public struct AnyTypedRequest<T> : TypedRequest
A type-erased TypedRequest.
An instance of AnyTypedRequest forwards its operations to an underlying typed request, hiding its specifics.
-
The type that can convert raw database rows to fetched values
Declaration
Swift
public typealias RowDecoder = T
-
Creates a new request that wraps and forwards operations to
request
.Declaration
Swift
public init<Request>(_ request: Request) where Request: TypedRequest, Request.RowDecoder == RowDecoder
-
Creates a new request whose
prepare()
method wraps and forwards operations the argument closure.Declaration
Swift
public init(_ prepare: @escaping (Database) throws -> (SelectStatement, RowAdapter?))
-
Declaration
Swift
public func prepare(_ db: Database) throws -> (SelectStatement, RowAdapter?)
-
Declaration
Swift
public func fetchCount(_ db: Database) throws -> Int
-
Declaration
Swift
public func fetchedRegion(_ db: Database) throws -> DatabaseRegion