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?))
-
A tuple that contains a prepared statement that is ready to be executed, and an eventual row adapter.
Declaration
Swift
public func prepare(_ db: Database) throws -> (SelectStatement, RowAdapter?)