rel8-internal
Safe HaskellNone
LanguageHaskell2010

Rel8.Internal.Expr.Opaleye

Synopsis

Documentation

unsafeCastExpr :: Sql DBType b => Expr a -> Expr b Source #

Cast an expression to a different type. Corresponds to a CAST() function call.

unsafeCoerceExpr :: Expr a -> Expr b Source #

Change the type of an Expr, without a cast. Even more unsafe than unsafeCastExpr. Only use this if you are certain that the typeNames of a and b refer to exactly the same PostgreSQL type.

unsafePrimExpr :: PrimExpr -> Expr a Source #

Import a raw PrimExpr from opaleye, without a cast.

This is an escape hatch, and can be used if Rel8 cannot adequately express the expression you need. If you find yourself using this function, please let us know, as it may indicate that something is missing from Rel8!

unsafeLiteral :: String -> Expr a Source #

Unsafely construct an expression from literal SQL.

This is an escape hatch, and can be used if Rel8 cannot adequately express the expression you need. If you find yourself using this function, please let us know, as it may indicate that something is missing from Rel8!

fromPrimExpr :: PrimExpr -> Expr a Source #

toPrimExpr :: Expr a -> PrimExpr Source #

mapPrimExpr :: (PrimExpr -> PrimExpr) -> Expr a -> Expr b Source #

zipPrimExprsWith :: (PrimExpr -> PrimExpr -> PrimExpr) -> Expr a -> Expr b -> Expr c Source #

traversePrimExpr :: Functor f => (PrimExpr -> f PrimExpr) -> Expr a -> f (Expr b) Source #

toColumn :: forall (n :: Nullability) b. PrimExpr -> Field_ n b Source #

fromColumn :: forall (n :: Nullability) b. Field_ n b -> PrimExpr Source #

traverseFieldP :: forall p (n :: Nullability) x (m :: Nullability) y a b. Profunctor p => p (Field_ n x) (Field_ m y) -> p (Expr a) (Expr b) Source #