AnyFetchRequest is now generic on RowDecoder

This commit is contained in:
Gwendal Roué committed 2020-05-08 16:43:02 +02:00
1 parent 94b4131ce4
commit 76e0a9f6b6
2 files changed
+4 -3

No files matched your search

+1 -3
View File
@@ -146,9 +146,7 @@ public struct AdaptedFetchRequest<Base: FetchRequest>: FetchRequest {
///
/// An AnyFetchRequest forwards its operations to an underlying request,
/// hiding its specifics.
public struct AnyFetchRequest<T>: FetchRequest {
public typealias RowDecoder = T
public struct AnyFetchRequest<RowDecoder>: FetchRequest {
private let _preparedRequest: (Database, _ singleResult: Bool) throws -> PreparedRequest
private let _fetchCount: (Database) throws -> Int
private let _databaseRegion: (Database) throws -> DatabaseRegion
+3
View File
@@ -7,6 +7,9 @@ import UIKit
#endif
extension AnyFetchRequest {
@available(*, unavailable, renamed: "RowDecoder")
typealias T = RowDecoder
@available(*, unavailable, message: "Define your own FetchRequest type instead.")
public init(_ prepare: @escaping (Database, _ singleResult: Bool) throws -> (SelectStatement, RowAdapter?))
{ preconditionFailure() }