Kamirus / purescript-selda

A type-safe, high-level SQL library for PureScript
MIT License
89 stars 3 forks source link

Different Expr type for different backends - Count & Max return type #27

Open Kamirus opened 4 years ago

Kamirus commented 4 years ago

pg returns the result of the COUT/MAX as String, because of potential precision loss. While other backends can return Int there (and losing some digits if the result does not fit the Int range)

It is useful to have the expression of type Col s Int rather than Col s String e.g. comparison on strings is different than on ints.

Potential solution:

paluh commented 4 years ago

I think we should handle this using purescript-bigints if possible in case of postgresql and not String.