Provide a veryUnsafeCoerceSqlExprValue function that may be useful.

This commit is contained in:
Felipe Lessa 2012-09-09 10:26:56 -03:00
parent c8a96db9da
commit ef771c6eda

View File

@ -30,6 +30,7 @@ module Database.Esqueleto.Internal.Sql
, Mode(..)
, Escape
, SqlSelect
, veryUnsafeCoerceSqlExprValue
) where
import Control.Applicative (Applicative(..), (<$>))
@ -343,6 +344,13 @@ unsafeSqlBinOp op (ERaw p1 f1) (ERaw p2 f2) = ERaw Parens f
, vals1 <> vals2 )
-- | (Internal) Coerce a type of a 'SqlExpr (Value a)' into
-- another 'SqlExpr (Value b)'. You should /not/ use this
-- function unless you know what you're doing!
veryUnsafeCoerceSqlExprValue :: SqlExpr (Value a) -> SqlExpr (Value b)
veryUnsafeCoerceSqlExprValue (ERaw p f) = ERaw p f
----------------------------------------------------------------------