You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose I want to make an SqlType instance for my own data type that can be represented as a value in an SQL column. E.g. I want to represent integers from 0 to 1000:
newtype SmallInt = SmallInt { unSmallInt :: Int }
I could define mkLit (SmallInt x) = LInt x. However, converting in the other direction, what should be done in fromSql if the input is an out-of-range SqlInt value? Just error? How does the user detect an error in the input when running a query?
The text was updated successfully, but these errors were encountered:
Suppose I want to make an SqlType instance for my own data type that can be represented as a value in an SQL column. E.g. I want to represent integers from 0 to 1000:
I could define
mkLit (SmallInt x) = LInt x
. However, converting in the other direction, what should be done infromSql
if the input is an out-of-range SqlInt value? Justerror
? How does the user detect an error in the input when running a query?The text was updated successfully, but these errors were encountered: