mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-25 04:07:47 +00:00
TODO conversion error message for adapted rows
This commit is contained in:
1 parent
cbda1f9211
commit
7d4ebce70a
1 file changed
+3
@@ -506,6 +506,7 @@ struct AdaptedRowImpl : RowImpl {
|
||||
atUncheckedIndex index: Int,
|
||||
debugInfo: @autoclosure () -> ValueConversionDebuggingInfo) -> Value
|
||||
{
|
||||
// TODO: expose the unadapted row and index in debugInfo. Test with a scoped row.
|
||||
let mappedIndex = mapping.baseColumnIndex(atMappingIndex: index)
|
||||
return base.impl.fastDecode(Value.self, atUncheckedIndex: mappedIndex, debugInfo: debugInfo) // base.impl: Demeter violation
|
||||
}
|
||||
@@ -515,6 +516,7 @@ struct AdaptedRowImpl : RowImpl {
|
||||
atUncheckedIndex index: Int,
|
||||
debugInfo: @autoclosure () -> ValueConversionDebuggingInfo) -> Value?
|
||||
{
|
||||
// TODO: expose the unadapted row and index in debugInfo. Test with a scoped row.
|
||||
let mappedIndex = mapping.baseColumnIndex(atMappingIndex: index)
|
||||
return base.impl.fastDecodeIfPresent(Value.self, atUncheckedIndex: mappedIndex, debugInfo: debugInfo) // base.impl: Demeter violation
|
||||
}
|
||||
@@ -523,6 +525,7 @@ struct AdaptedRowImpl : RowImpl {
|
||||
atUncheckedIndex index:Int,
|
||||
debugInfo: @autoclosure () -> ValueConversionDebuggingInfo) -> Data?
|
||||
{
|
||||
// TODO: expose the unadapted row and index in debugInfo. Test with a scoped row.
|
||||
let mappedIndex = mapping.baseColumnIndex(atMappingIndex: index)
|
||||
return base.impl.dataNoCopy(atUncheckedIndex: mappedIndex, debugInfo: debugInfo) // base.impl: Demeter violation
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user