persistent-2.14.5.2: Type-safe, multi-backend data serialization.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Database.Persist.FieldDef.Internal

Description

Since: 2.13.0.0

Synopsis

Documentation

data FieldDef Source #

A FieldDef represents the inormation that persistent knows about a field of a datatype. This includes information used to parse the field out of the database and what the field corresponds to.

Constructors

FieldDef 

Fields

Instances

Instances details
Read FieldDef Source # 
Instance details

Defined in Database.Persist.Types.Base

Show FieldDef Source # 
Instance details

Defined in Database.Persist.Types.Base

Eq FieldDef Source # 
Instance details

Defined in Database.Persist.Types.Base

Ord FieldDef Source # 
Instance details

Defined in Database.Persist.Types.Base

Lift FieldDef Source # 
Instance details

Defined in Database.Persist.Types.Base

Methods

lift :: Quote m => FieldDef -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => FieldDef -> Code m FieldDef #

data FieldCascade Source #

This datatype describes how a foreign reference field cascades deletes or updates.

This type is used in both parsing the model definitions and performing migrations. A Nothing in either of the field values means that the user has not specified a CascadeAction. An unspecified CascadeAction is defaulted to Restrict when doing migrations.

Since: 2.11.0

renderFieldCascade :: FieldCascade -> Text Source #

Renders a FieldCascade value such that it can be used in SQL migrations.

Since: 2.11.0

renderCascadeAction :: CascadeAction -> Text Source #

Render a CascadeAction to Text such that it can be used in a SQL command.

Since: 2.11.0

noCascade :: FieldCascade Source #

A FieldCascade that does nothing.

Since: 2.11.0

data CascadeAction Source #

An action that might happen on a deletion or update on a foreign key change.

Since: 2.11.0