Open alexmingoia opened 3 years ago
I think I found the cause of this bug.
https://github.com/valderman/selda/blob/master/selda/src/Database/Selda/SqlRow.hs#L69
then return Nothing
When the whole Row
is null, it doesn't consume SqlValue
's in the ResultReader
state monad.
This code should be something like:
then Nothing <$ R (put (drop (nestedCols (Proxy :: Proxy a)) xs))
If a query with a left join returns non-nullable columns after a left join row in the inductive tuple, a crash occurs.
This gist reproduces the crash.
This crashes with
fromSql: text column with non-text value: SqlNull
:But this doesn't (inductive tuple order is flipped):