mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
Breaking: AnyFetchRequest.asRequest(of:)
This commit is contained in:
1 parent
e0266bdde3
commit
a5de2b9288
5 files changed
+37
-18
No files matched your search
@@ -366,9 +366,9 @@ extension QueryInterfaceRequest {
|
||||
map(\.query) { $0.limit(limit, offset: offset) }
|
||||
}
|
||||
|
||||
/// Creates a request bound to type Target.
|
||||
/// Creates a request bound to type RowDecoder.
|
||||
///
|
||||
/// The returned request can fetch if the type Target is fetchable (Row,
|
||||
/// The returned request can fetch if the type RowDecoder is fetchable (Row,
|
||||
/// value, record).
|
||||
///
|
||||
/// // Int?
|
||||
@@ -377,8 +377,8 @@ extension QueryInterfaceRequest {
|
||||
/// .asRequest(of: Int.self) // <--
|
||||
/// .fetchOne(db)
|
||||
///
|
||||
/// - parameter type: The fetched type Target
|
||||
/// - returns: A typed request bound to type Target.
|
||||
/// - parameter type: The fetched type RowDecoder
|
||||
/// - returns: A request bound to type RowDecoder.
|
||||
public func asRequest<RowDecoder>(of type: RowDecoder.Type) -> QueryInterfaceRequest<RowDecoder> {
|
||||
QueryInterfaceRequest<RowDecoder>(query: query)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user