persistent-1.1.5.1: Type-safe, multi-backend data serialization.

Safe Haskell | None

Database.Persist.Util

Synopsis

- nullable :: [Text] -> IsNullable
- data IsNullable
  - = Nullable !WhyNullable
  - | NotNullable
- data WhyNullable
  - = ByMaybeAttr
  - | ByNullableAttr
- deprecate :: String -> a -> a

# Documentation

nullable :: [Text] -> IsNullable

data IsNullable

Constructors

Nullable !WhyNullable |
NotNullable |

Instances

Eq IsNullable |
Show IsNullable |

data WhyNullable

The reason why a field is `nullable` is very important. A field that is nullable because of a `Maybe` tag will have its type changed from `A` to `Maybe A`. OTOH, a field that is nullable because of a `nullable` tag will remain with the same type.

Constructors

ByMaybeAttr |
ByNullableAttr |

Instances

Eq WhyNullable |
Show WhyNullable |

deprecate :: String -> a -> a