girella icon indicating copy to clipboard operation
girella copied to clipboard

`emptyUpdate` got new semantics with opaleye-0.4

Open bergmark opened this issue 9 years ago • 5 comments

To fix this I think we should scrap runUpdateConst and replace emptyUpdate with another TH-generated function IdUpdate :: To Column R -> To Maybe (To Column R) which could be used like this:

runUpdate table (\r -> (f r) { name = Just $ constant x }) condition

This will make sure that all code that uses it has to get updated.

bergmark avatar Aug 17 '15 08:08 bergmark

What changed exactly about the semantics of emptyUpdate?

hesselink avatar Aug 20 '15 08:08 hesselink

tomjaguarpaw/haskell-opaleye#92

bergmark avatar Aug 21 '15 12:08 bergmark

What would runUpdate do? Would it set all columns explicitly to their old values? I think that might be tricky, since they might have been updated, like I mentioned in the opaleye issue.

hesselink avatar Aug 21 '15 13:08 hesselink

Is this issue the reason why the Opaleye dependency has not been changed to allow 0.4?

c-lewis avatar Nov 06 '15 14:11 c-lewis

Yep, Everything else should work with 0.4. My suggestion for opaleye is here. I forgot to ping tom again, I'll do that now.

bergmark avatar Nov 06 '15 15:11 bergmark