bug in optional support for decoding
Chris-Stockbridge opened this issue · 1 comments
Chris-Stockbridge commented
If a table includes an optional custom struct, the decode method throws an error when the optional value is nil
I created a unit test demonstrating this here:
master...Chris-Stockbridge:SQLite.swift:master
d5b2adc
This unit test passes with the previous release, but breaks starting with 0.15.0
Chris-Stockbridge commented
I think the issue comes from
nil
is a valid return value here. If row.get()
throws, then this method should fail, but if the return value is nil
then decodeIfPresent()
should return nil
.