rel8-internal
Safe HaskellSafe-Inferred
LanguageHaskell2010

Rel8.Internal.Schema.Null

Synopsis

Documentation

type Unnullify a = Unnullify' (IsMaybe a) a Source #

class (Nullable a, IsMaybe a ~ 'False) => NotNull a Source #

nullify a means a cannot take null as a value.

Instances

Instances details
(Nullable a, IsMaybe a ~ 'False) => NotNull a Source # 
Instance details

Defined in Rel8.Internal.Schema.Null

class IsMaybe a ~ IsMaybe b => Homonullable a b Source #

Homonullable a b means that both a and b can be null, or neither a or b can be null.

Instances

Instances details
IsMaybe a ~ IsMaybe b => Homonullable a b Source # 
Instance details

Defined in Rel8.Internal.Schema.Null

data Nullity a where Source #

Constructors

NotNull :: forall a. NotNull a => Nullity a 
Null :: forall a1. NotNull a1 => Nullity (Maybe a1) 

class Nullable' (IsMaybe a) a => Nullable a Source #

Nullable a means that rel8 is able to check if the type a is a type that can take null values or not.

Instances

Instances details
Nullable' (IsMaybe a) a => Nullable a Source # 
Instance details

Defined in Rel8.Internal.Schema.Null

class (constraint (Unnullify a), Nullable a) => Sql (constraint :: Type -> Constraint) a Source #

The Sql type class describes both null and not null database values, constrained by a specific class.

For example, if you see Sql DBEq a, this means any database type that supports equality, and a can either be exactly an a, or it could also be Maybe a.

Instances

Instances details
(constraint (Unnullify a), Nullable a) => Sql constraint a Source # 
Instance details

Defined in Rel8.Internal.Schema.Null