Hi, I'm getting this error when doing a simple fetch. Xcode 10.2.1, Swift 5, GRDB 4.0.1.
The bannerPath
is an Optional String:
I'm not sure why this would be the case. Any suggestions on this? Presumably the NULL
type would be converted to nil
.
Here is the fetching code:
public func fetchPlaylists(for channelUuid: String) -> Single<[Playlist]> {
return Single.create { [unowned self] single in
do {
var fetched: [Playlist] = []
try self.dbPool.read { db in
fetched = try Playlist.filter(Column("channelUuid") == channelUuid).fetchAll(db)
}
single(.success(fetched))
} catch {
DDLogDebug("error: \(error)")
single(.error(error))
}
return Disposables.create {}
}
}
This is the error location in the log:
file /Users/michael/src/kjvrvg-ios/Pods/GRDB.swift/GRDB/Core/DatabaseValueConversion.swift, line 146
NOTE: it reports it as line 146 but the compiler throws the fatalError() exception at line 132, slightly above. The function signature where the crash is:
/// The canonical conversion fatal error
///
/// - parameter dbValue: nil means "missing column", for consistency with (row["missing"] as DatabaseValue? == nil)
func fatalConversionError<T>(to: T.Type, from dbValue: DatabaseValue?, conversionContext: ValueConversionContext?, file: StaticString = #file, line: UInt = #line) -> Never {
Regards,
Michael