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

Safe Haskell | None
Language | Haskell2010

Database.Persist.Names

Description

This module contains types and functions for working with and disambiguating database and Haskell names.

Since: 2.13.0.0

Synopsis

- class DatabaseName a where
  - escapeWith :: (Text -> str) -> a -> str
- newtype FieldNameDB = FieldNameDB {
  - unFieldNameDB :: Text
  }
- newtype FieldNameHS = FieldNameHS {
  - unFieldNameHS :: Text
  }
- newtype EntityNameHS = EntityNameHS {
  - unEntityNameHS :: Text
  }
- newtype EntityNameDB = EntityNameDB {
  - unEntityNameDB :: Text
  }
- newtype ConstraintNameDB = ConstraintNameDB {
  - unConstraintNameDB :: Text
  }
- newtype ConstraintNameHS = ConstraintNameHS {
  - unConstraintNameHS :: Text
  }

# Documentation

class DatabaseName a where #

Convenience operations for working with '-NameDB' types.

Since: 2.12.0.0

Methods

escapeWith :: (Text -> str) -> a -> str #

#### Instances

Instances details

DatabaseName ConstraintNameDB # | Since: 2.12.0.0
Instance details Defined in Database.Persist.Names Methods escapeWith :: (Text -> str) -> ConstraintNameDB -> str #
DatabaseName EntityNameDB # |
Instance details Defined in Database.Persist.Names Methods escapeWith :: (Text -> str) -> EntityNameDB -> str #
DatabaseName FieldNameDB # | Since: 2.12.0.0
Instance details Defined in Database.Persist.Names Methods escapeWith :: (Text -> str) -> FieldNameDB -> str #

newtype FieldNameDB #

A `FieldNameDB` represents the datastore-side name that `persistent` will use for a field.

Since: 2.12.0.0

Constructors

FieldNameDB |

Fields

- unFieldNameDB :: Text

#### Instances

Instances details

Read FieldNameDB # |
Instance details Defined in Database.Persist.Names Methods readsPrec :: Int -> ReadS FieldNameDB # readList :: ReadS [FieldNameDB] # readPrec :: ReadPrec FieldNameDB # readListPrec :: ReadPrec [FieldNameDB] #
Show FieldNameDB # |
Instance details Defined in Database.Persist.Names Methods showsPrec :: Int -> FieldNameDB -> ShowS # show :: FieldNameDB -> String # showList :: [FieldNameDB] -> ShowS #
Eq FieldNameDB # |
Instance details Defined in Database.Persist.Names Methods (==) :: FieldNameDB -> FieldNameDB -> Bool # (/=) :: FieldNameDB -> FieldNameDB -> Bool #
Ord FieldNameDB # |
Instance details Defined in Database.Persist.Names Methods compare :: FieldNameDB -> FieldNameDB -> Ordering # (<) :: FieldNameDB -> FieldNameDB -> Bool # (<=) :: FieldNameDB -> FieldNameDB -> Bool # (>) :: FieldNameDB -> FieldNameDB -> Bool # (>=) :: FieldNameDB -> FieldNameDB -> Bool # max :: FieldNameDB -> FieldNameDB -> FieldNameDB # min :: FieldNameDB -> FieldNameDB -> FieldNameDB #
DatabaseName FieldNameDB # | Since: 2.12.0.0
Instance details Defined in Database.Persist.Names Methods escapeWith :: (Text -> str) -> FieldNameDB -> str #
Lift FieldNameDB # |
Instance details Defined in Database.Persist.Names Methods lift :: Quote m => FieldNameDB -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => FieldNameDB -> Code m FieldNameDB #

newtype FieldNameHS #

A `FieldNameHS` represents the Haskell-side name that `persistent` will use for a field.

Since: 2.12.0.0

Constructors

FieldNameHS |

Fields

- unFieldNameHS :: Text

#### Instances

Instances details

Read FieldNameHS # |
Instance details Defined in Database.Persist.Names Methods readsPrec :: Int -> ReadS FieldNameHS # readList :: ReadS [FieldNameHS] # readPrec :: ReadPrec FieldNameHS # readListPrec :: ReadPrec [FieldNameHS] #
Show FieldNameHS # |
Instance details Defined in Database.Persist.Names Methods showsPrec :: Int -> FieldNameHS -> ShowS # show :: FieldNameHS -> String # showList :: [FieldNameHS] -> ShowS #
Eq FieldNameHS # |
Instance details Defined in Database.Persist.Names Methods (==) :: FieldNameHS -> FieldNameHS -> Bool # (/=) :: FieldNameHS -> FieldNameHS -> Bool #
Ord FieldNameHS # |
Instance details Defined in Database.Persist.Names Methods compare :: FieldNameHS -> FieldNameHS -> Ordering # (<) :: FieldNameHS -> FieldNameHS -> Bool # (<=) :: FieldNameHS -> FieldNameHS -> Bool # (>) :: FieldNameHS -> FieldNameHS -> Bool # (>=) :: FieldNameHS -> FieldNameHS -> Bool # max :: FieldNameHS -> FieldNameHS -> FieldNameHS # min :: FieldNameHS -> FieldNameHS -> FieldNameHS #
Lift FieldNameHS # |
Instance details Defined in Database.Persist.Names Methods lift :: Quote m => FieldNameHS -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => FieldNameHS -> Code m FieldNameHS #

newtype EntityNameHS #

An `EntityNameHS` represents the Haskell-side name that `persistent` will use for an entity.

Since: 2.12.0.0

Constructors

EntityNameHS |

Fields

- unEntityNameHS :: Text

#### Instances

Instances details

Read EntityNameHS # |
Instance details Defined in Database.Persist.Names Methods readsPrec :: Int -> ReadS EntityNameHS # readList :: ReadS [EntityNameHS] # readPrec :: ReadPrec EntityNameHS # readListPrec :: ReadPrec [EntityNameHS] #
Show EntityNameHS # |
Instance details Defined in Database.Persist.Names Methods showsPrec :: Int -> EntityNameHS -> ShowS # show :: EntityNameHS -> String # showList :: [EntityNameHS] -> ShowS #
Eq EntityNameHS # |
Instance details Defined in Database.Persist.Names Methods (==) :: EntityNameHS -> EntityNameHS -> Bool # (/=) :: EntityNameHS -> EntityNameHS -> Bool #
Ord EntityNameHS # |

Instance details

Defined in Database.Persist.Names

Methods

compare :: EntityNameHS -> EntityNameHS -> Ordering #

(<) :: EntityNameHS -> EntityNameHS -> Bool #

(<=) :: EntityNameHS -> EntityNameHS -> Bool #

(>) :: EntityNameHS -> EntityNameHS -> Bool #

(>=) :: EntityNameHS -> EntityNameHS -> Bool #

max :: EntityNameHS -> EntityNameHS -> EntityNameHS #

min :: EntityNameHS -> EntityNameHS -> EntityNameHS #

Lift EntityNameHS # |
Instance details Defined in Database.Persist.Names Methods lift :: Quote m => EntityNameHS -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => EntityNameHS -> Code m EntityNameHS #

newtype EntityNameDB #

An `EntityNameDB` represents the datastore-side name that `persistent` will use for an entity.

Since: 2.12.0.0

Constructors

EntityNameDB |

Fields

- unEntityNameDB :: Text

#### Instances

Instances details

Read EntityNameDB # |
Instance details Defined in Database.Persist.Names Methods readsPrec :: Int -> ReadS EntityNameDB # readList :: ReadS [EntityNameDB] # readPrec :: ReadPrec EntityNameDB # readListPrec :: ReadPrec [EntityNameDB] #
Show EntityNameDB # |
Instance details Defined in Database.Persist.Names Methods showsPrec :: Int -> EntityNameDB -> ShowS # show :: EntityNameDB -> String # showList :: [EntityNameDB] -> ShowS #
Eq EntityNameDB # |
Instance details Defined in Database.Persist.Names Methods (==) :: EntityNameDB -> EntityNameDB -> Bool # (/=) :: EntityNameDB -> EntityNameDB -> Bool #
Ord EntityNameDB # |

Instance details

Defined in Database.Persist.Names

Methods

compare :: EntityNameDB -> EntityNameDB -> Ordering #

(<) :: EntityNameDB -> EntityNameDB -> Bool #

(<=) :: EntityNameDB -> EntityNameDB -> Bool #

(>) :: EntityNameDB -> EntityNameDB -> Bool #

(>=) :: EntityNameDB -> EntityNameDB -> Bool #

max :: EntityNameDB -> EntityNameDB -> EntityNameDB #

min :: EntityNameDB -> EntityNameDB -> EntityNameDB #

DatabaseName EntityNameDB # |
Instance details Defined in Database.Persist.Names Methods escapeWith :: (Text -> str) -> EntityNameDB -> str #
Lift EntityNameDB # |
Instance details Defined in Database.Persist.Names Methods lift :: Quote m => EntityNameDB -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => EntityNameDB -> Code m EntityNameDB #

newtype ConstraintNameDB #

A `ConstraintNameDB` represents the datastore-side name that `persistent` will use for a constraint.

Since: 2.12.0.0

Constructors

ConstraintNameDB |

Fields

- unConstraintNameDB :: Text

#### Instances

Instances details

Read ConstraintNameDB # |
Instance details Defined in Database.Persist.Names Methods readsPrec :: Int -> ReadS ConstraintNameDB # readList :: ReadS [ConstraintNameDB] # readPrec :: ReadPrec ConstraintNameDB # readListPrec :: ReadPrec [ConstraintNameDB] #
Show ConstraintNameDB # |
Instance details Defined in Database.Persist.Names Methods showsPrec :: Int -> ConstraintNameDB -> ShowS # show :: ConstraintNameDB -> String # showList :: [ConstraintNameDB] -> ShowS #
Eq ConstraintNameDB # |
Instance details Defined in Database.Persist.Names Methods (==) :: ConstraintNameDB -> ConstraintNameDB -> Bool # (/=) :: ConstraintNameDB -> ConstraintNameDB -> Bool #
Ord ConstraintNameDB # |

Instance details

Defined in Database.Persist.Names

Methods

compare :: ConstraintNameDB -> ConstraintNameDB -> Ordering #

(<) :: ConstraintNameDB -> ConstraintNameDB -> Bool #

(<=) :: ConstraintNameDB -> ConstraintNameDB -> Bool #

(>) :: ConstraintNameDB -> ConstraintNameDB -> Bool #

(>=) :: ConstraintNameDB -> ConstraintNameDB -> Bool #

max :: ConstraintNameDB -> ConstraintNameDB -> ConstraintNameDB #

min :: ConstraintNameDB -> ConstraintNameDB -> ConstraintNameDB #

DatabaseName ConstraintNameDB # | Since: 2.12.0.0
Instance details Defined in Database.Persist.Names Methods escapeWith :: (Text -> str) -> ConstraintNameDB -> str #
Lift ConstraintNameDB # |
Instance details Defined in Database.Persist.Names Methods lift :: Quote m => ConstraintNameDB -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => ConstraintNameDB -> Code m ConstraintNameDB #

newtype ConstraintNameHS #

An `ConstraintNameHS` represents the Haskell-side name that `persistent` will use for a constraint.

Since: 2.12.0.0

Constructors

ConstraintNameHS |

Fields

- unConstraintNameHS :: Text

#### Instances

Instances details

Read ConstraintNameHS # |
Instance details Defined in Database.Persist.Names Methods readsPrec :: Int -> ReadS ConstraintNameHS # readList :: ReadS [ConstraintNameHS] # readPrec :: ReadPrec ConstraintNameHS # readListPrec :: ReadPrec [ConstraintNameHS] #
Show ConstraintNameHS # |
Instance details Defined in Database.Persist.Names Methods showsPrec :: Int -> ConstraintNameHS -> ShowS # show :: ConstraintNameHS -> String # showList :: [ConstraintNameHS] -> ShowS #
Eq ConstraintNameHS # |
Instance details Defined in Database.Persist.Names Methods (==) :: ConstraintNameHS -> ConstraintNameHS -> Bool # (/=) :: ConstraintNameHS -> ConstraintNameHS -> Bool #
Ord ConstraintNameHS # |

Instance details

Defined in Database.Persist.Names

Methods

compare :: ConstraintNameHS -> ConstraintNameHS -> Ordering #

(<) :: ConstraintNameHS -> ConstraintNameHS -> Bool #

(<=) :: ConstraintNameHS -> ConstraintNameHS -> Bool #

(>) :: ConstraintNameHS -> ConstraintNameHS -> Bool #

(>=) :: ConstraintNameHS -> ConstraintNameHS -> Bool #

max :: ConstraintNameHS -> ConstraintNameHS -> ConstraintNameHS #

min :: ConstraintNameHS -> ConstraintNameHS -> ConstraintNameHS #

Lift ConstraintNameHS # |
Instance details Defined in Database.Persist.Names Methods lift :: Quote m => ConstraintNameHS -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => ConstraintNameHS -> Code m ConstraintNameHS #