persistent-2.17.1.0: 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 Source #

Convenience operations for working with '-NameDB' types.

Since: 2.12.0.0

Methods

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

#### Instances

Instances details

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

newtype FieldNameDB Source #

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

Instance details

Defined in Database.Persist.Names

Methods

compare :: FieldNameDB -> FieldNameDB -> Ordering Source #

(<) :: FieldNameDB -> FieldNameDB -> Bool Source #

(<=) :: FieldNameDB -> FieldNameDB -> Bool Source #

(>) :: FieldNameDB -> FieldNameDB -> Bool Source #

(>=) :: FieldNameDB -> FieldNameDB -> Bool Source #

max :: FieldNameDB -> FieldNameDB -> FieldNameDB Source #

min :: FieldNameDB -> FieldNameDB -> FieldNameDB Source #

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

newtype FieldNameHS Source #

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

Instance details

Defined in Database.Persist.Names

Methods

compare :: FieldNameHS -> FieldNameHS -> Ordering Source #

(<) :: FieldNameHS -> FieldNameHS -> Bool Source #

(<=) :: FieldNameHS -> FieldNameHS -> Bool Source #

(>) :: FieldNameHS -> FieldNameHS -> Bool Source #

(>=) :: FieldNameHS -> FieldNameHS -> Bool Source #

max :: FieldNameHS -> FieldNameHS -> FieldNameHS Source #

min :: FieldNameHS -> FieldNameHS -> FieldNameHS Source #

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

newtype EntityNameHS Source #

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

Instance details

Defined in Database.Persist.Names

Methods

compare :: EntityNameHS -> EntityNameHS -> Ordering Source #

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

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

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

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

max :: EntityNameHS -> EntityNameHS -> EntityNameHS Source #

min :: EntityNameHS -> EntityNameHS -> EntityNameHS Source #

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

newtype EntityNameDB Source #

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

Instance details

Defined in Database.Persist.Names

Methods

compare :: EntityNameDB -> EntityNameDB -> Ordering Source #

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

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

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

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

max :: EntityNameDB -> EntityNameDB -> EntityNameDB Source #

min :: EntityNameDB -> EntityNameDB -> EntityNameDB Source #

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

newtype ConstraintNameDB Source #

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

Instance details

Defined in Database.Persist.Names

Methods

compare :: ConstraintNameDB -> ConstraintNameDB -> Ordering Source #

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

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

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

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

max :: ConstraintNameDB -> ConstraintNameDB -> ConstraintNameDB Source #

min :: ConstraintNameDB -> ConstraintNameDB -> ConstraintNameDB Source #

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

newtype ConstraintNameHS Source #

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

Instance details

Defined in Database.Persist.Names

Methods

compare :: ConstraintNameHS -> ConstraintNameHS -> Ordering Source #

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

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

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

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

max :: ConstraintNameHS -> ConstraintNameHS -> ConstraintNameHS Source #

min :: ConstraintNameHS -> ConstraintNameHS -> ConstraintNameHS Source #

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