bitemyapp / bitemyapp/esqueleto
Calling `sum_` on an `Int` column and trying to use the result as an `Int` leads to a marshal error
Open
bug
help wanted
needs discussion
- Dominant language
- Haskell
- Stars
- 399
- Forks
- 107
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 1
Description
It appears that (at least in Postgresql), summing a list of `int`s gives back a `numeric`. So when you call `sum_` from esqueleto on an `Int` column and use the result as an `Int` you get a persist marshal error. IMO this should probably be solved on esqueleto's end, by either inserting an explicit cast or by restricting the return type of `sum_` to ones which will not raise a marshal error.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.