AnyRequest
public struct AnyRequest : Request
A type-erased Request.
An instance of AnyRequest forwards its operations to an underlying request, hiding its specifics.
-
Creates a new request that wraps and forwards operations to
request
.Declaration
Swift
public init(_ request: Request)
-
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