| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Rel8.Internal.Expr.Null
Synopsis
- null :: DBType a => Expr (Maybe a)
- snull :: TypeInformation a -> Expr (Maybe a)
- nullableExpr :: Expr b -> (Expr a -> Expr b) -> Expr (Maybe a) -> Expr b
- nullableOf :: DBType a => Maybe (Expr a) -> Expr (Maybe a)
- isNull :: Expr (Maybe a) -> Expr Bool
- isNonNull :: Expr (Maybe a) -> Expr Bool
- nullify :: NotNull a => Expr a -> Expr (Maybe a)
- unsafeUnnullify :: Expr (Maybe a) -> Expr a
- mapNull :: DBType b => (Expr a -> Expr b) -> Expr (Maybe a) -> Expr (Maybe b)
- liftOpNull :: DBType c => (Expr a -> Expr b -> Expr c) -> Expr (Maybe a) -> Expr (Maybe b) -> Expr (Maybe c)
- unsafeMapNull :: NotNull b => (Expr a -> Expr b) -> Expr (Maybe a) -> Expr (Maybe b)
- unsafeLiftOpNull :: NotNull c => (Expr a -> Expr b -> Expr c) -> Expr (Maybe a) -> Expr (Maybe b) -> Expr (Maybe c)
Documentation
nullableExpr :: Expr b -> (Expr a -> Expr b) -> Expr (Maybe a) -> Expr b Source #
Like maybe, but to eliminate null.
nullify :: NotNull a => Expr a -> Expr (Maybe a) Source #
Lift an expression that can't be null to a type that might be null.
This is an identity operation in terms of any generated query, and just
modifies the query's type.
unsafeUnnullify :: Expr (Maybe a) -> Expr a Source #
Assume that a nullable column's value is non-null. If the column is
actually null, this will lead to runtime errors when you try to decode
the value into Haskell, so you should prefer to use nullable
unless you know what you're doing.