| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Rel8.Internal.Expr.Opaleye
Synopsis
- castExpr :: Sql DBType a => Expr a -> Expr a
- unsafeCastExpr :: Sql DBType b => Expr a -> Expr b
- scastExpr :: TypeInformation (Unnullify a) -> Expr a -> Expr a
- sunsafeCastExpr :: TypeName -> Expr a -> Expr b
- unsafeCoerceExpr :: Expr a -> Expr b
- unsafePrimExpr :: PrimExpr -> Expr a
- unsafeLiteral :: String -> Expr a
- fromPrimExpr :: PrimExpr -> Expr a
- toPrimExpr :: Expr a -> PrimExpr
- mapPrimExpr :: (PrimExpr -> PrimExpr) -> Expr a -> Expr b
- zipPrimExprsWith :: (PrimExpr -> PrimExpr -> PrimExpr) -> Expr a -> Expr b -> Expr c
- traversePrimExpr :: Functor f => (PrimExpr -> f PrimExpr) -> Expr a -> f (Expr b)
- toColumn :: forall (n :: Nullability) b. PrimExpr -> Field_ n b
- fromColumn :: forall (n :: Nullability) b. Field_ n b -> PrimExpr
- 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)
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 #
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 #