From 7d4ebce70aade70da756d0365a7db9f2a82bbc63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 10 Aug 2018 04:52:59 +0200 Subject: [PATCH] TODO conversion error message for adapted rows --- GRDB/Core/RowAdapter.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GRDB/Core/RowAdapter.swift b/GRDB/Core/RowAdapter.swift index 6cdf94aff..52bfb55e0 100644 --- a/GRDB/Core/RowAdapter.swift +++ b/GRDB/Core/RowAdapter.swift @@ -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 }