persistent-test-2.12.0.0: Tests for Persistent
Safe HaskellNone
LanguageHaskell2010

PrimaryTest

Documentation

data Foo Source #

Constructors

Foo 

Fields

Instances

Instances details
PersistFieldSql Foo Source # 
Instance details

Defined in PrimaryTest

Methods

sqlType :: Proxy Foo -> SqlType #

(TypeError (NoUniqueKeysError Foo) :: Constraint) => OnlyOneUniqueKey Foo Source # 
Instance details

Defined in PrimaryTest

Methods

onlyUniqueP :: Foo -> Unique Foo #

(TypeError (MultipleUniqueKeysError Foo) :: Constraint) => AtLeastOneUniqueKey Foo Source # 
Instance details

Defined in PrimaryTest

PersistEntity Foo Source # 
Instance details

Defined in PrimaryTest

Associated Types

type PersistEntityBackend Foo #

data Key Foo #

data EntityField Foo :: Type -> Type #

data Unique Foo #

PersistField Foo Source # 
Instance details

Defined in PrimaryTest

SymbolToField "name" Foo String Source # 
Instance details

Defined in PrimaryTest

SymbolToField "quux" Bar (Key Foo) Source # 
Instance details

Defined in PrimaryTest

Eq (Key Foo) Source # 
Instance details

Defined in PrimaryTest

Methods

(==) :: Key Foo -> Key Foo -> Bool #

(/=) :: Key Foo -> Key Foo -> Bool #

Ord (Key Foo) Source # 
Instance details

Defined in PrimaryTest

Methods

compare :: Key Foo -> Key Foo -> Ordering #

(<) :: Key Foo -> Key Foo -> Bool #

(<=) :: Key Foo -> Key Foo -> Bool #

(>) :: Key Foo -> Key Foo -> Bool #

(>=) :: Key Foo -> Key Foo -> Bool #

max :: Key Foo -> Key Foo -> Key Foo #

min :: Key Foo -> Key Foo -> Key Foo #

Read (Key Foo) Source # 
Instance details

Defined in PrimaryTest

Show (Key Foo) Source # 
Instance details

Defined in PrimaryTest

Methods

showsPrec :: Int -> Key Foo -> ShowS #

show :: Key Foo -> String #

showList :: [Key Foo] -> ShowS #

ToJSON (Key Foo) Source # 
Instance details

Defined in PrimaryTest

FromJSON (Key Foo) Source # 
Instance details

Defined in PrimaryTest

ToHttpApiData (Key Foo) Source # 
Instance details

Defined in PrimaryTest

FromHttpApiData (Key Foo) Source # 
Instance details

Defined in PrimaryTest

PathPiece (Key Foo) Source # 
Instance details

Defined in PrimaryTest

PersistFieldSql (Key Foo) Source # 
Instance details

Defined in PrimaryTest

Methods

sqlType :: Proxy (Key Foo) -> SqlType #

PersistField (Key Foo) Source # 
Instance details

Defined in PrimaryTest

data Unique Foo Source # 
Instance details

Defined in PrimaryTest

data Unique Foo
data EntityField Foo typ Source # 
Instance details

Defined in PrimaryTest

data EntityField Foo typ
newtype Key Foo Source # 
Instance details

Defined in PrimaryTest

newtype Key Foo = FooKey {}
type PersistEntityBackend Foo Source # 
Instance details

Defined in PrimaryTest

data Bar Source #

Constructors

Bar 

Fields

Instances

Instances details
PersistFieldSql Bar Source # 
Instance details

Defined in PrimaryTest

Methods

sqlType :: Proxy Bar -> SqlType #

(TypeError (NoUniqueKeysError Bar) :: Constraint) => OnlyOneUniqueKey Bar Source # 
Instance details

Defined in PrimaryTest

Methods

onlyUniqueP :: Bar -> Unique Bar #

(TypeError (MultipleUniqueKeysError Bar) :: Constraint) => AtLeastOneUniqueKey Bar Source # 
Instance details

Defined in PrimaryTest

PersistEntity Bar Source # 
Instance details

Defined in PrimaryTest

Associated Types

type PersistEntityBackend Bar #

data Key Bar #

data EntityField Bar :: Type -> Type #

data Unique Bar #

PersistField Bar Source # 
Instance details

Defined in PrimaryTest

ToBackendKey SqlBackend Bar Source # 
Instance details

Defined in PrimaryTest

SymbolToField "quux" Bar (Key Foo) Source # 
Instance details

Defined in PrimaryTest

Eq (Key Bar) Source # 
Instance details

Defined in PrimaryTest

Methods

(==) :: Key Bar -> Key Bar -> Bool #

(/=) :: Key Bar -> Key Bar -> Bool #

Ord (Key Bar) Source # 
Instance details

Defined in PrimaryTest

Methods

compare :: Key Bar -> Key Bar -> Ordering #

(<) :: Key Bar -> Key Bar -> Bool #

(<=) :: Key Bar -> Key Bar -> Bool #

(>) :: Key Bar -> Key Bar -> Bool #

(>=) :: Key Bar -> Key Bar -> Bool #

max :: Key Bar -> Key Bar -> Key Bar #

min :: Key Bar -> Key Bar -> Key Bar #

Read (Key Bar) Source # 
Instance details

Defined in PrimaryTest

Show (Key Bar) Source # 
Instance details

Defined in PrimaryTest

Methods

showsPrec :: Int -> Key Bar -> ShowS #

show :: Key Bar -> String #

showList :: [Key Bar] -> ShowS #

ToJSON (Key Bar) Source # 
Instance details

Defined in PrimaryTest

FromJSON (Key Bar) Source # 
Instance details

Defined in PrimaryTest

ToHttpApiData (Key Bar) Source # 
Instance details

Defined in PrimaryTest

FromHttpApiData (Key Bar) Source # 
Instance details

Defined in PrimaryTest

PathPiece (Key Bar) Source # 
Instance details

Defined in PrimaryTest

PersistFieldSql (Key Bar) Source # 
Instance details

Defined in PrimaryTest

Methods

sqlType :: Proxy (Key Bar) -> SqlType #

PersistField (Key Bar) Source # 
Instance details

Defined in PrimaryTest

data Unique Bar Source # 
Instance details

Defined in PrimaryTest

data Unique Bar
data EntityField Bar typ Source # 
Instance details

Defined in PrimaryTest

data EntityField Bar typ
newtype Key Bar Source # 
Instance details

Defined in PrimaryTest

type PersistEntityBackend Bar Source # 
Instance details

Defined in PrimaryTest

data Trees Source #

Constructors

Trees 

Instances

Instances details
PersistFieldSql Trees Source # 
Instance details

Defined in PrimaryTest

Methods

sqlType :: Proxy Trees -> SqlType #

(TypeError (NoUniqueKeysError Trees) :: Constraint) => OnlyOneUniqueKey Trees Source # 
Instance details

Defined in PrimaryTest

(TypeError (MultipleUniqueKeysError Trees) :: Constraint) => AtLeastOneUniqueKey Trees Source # 
Instance details

Defined in PrimaryTest

PersistEntity Trees Source # 
Instance details

Defined in PrimaryTest

Associated Types

type PersistEntityBackend Trees #

data Key Trees #

data EntityField Trees :: Type -> Type #

data Unique Trees #

PersistField Trees Source # 
Instance details

Defined in PrimaryTest

SymbolToField "name" Trees String Source # 
Instance details

Defined in PrimaryTest

SymbolToField "parent" Trees (Maybe String) Source # 
Instance details

Defined in PrimaryTest

Eq (Key Trees) Source # 
Instance details

Defined in PrimaryTest

Methods

(==) :: Key Trees -> Key Trees -> Bool #

(/=) :: Key Trees -> Key Trees -> Bool #

Ord (Key Trees) Source # 
Instance details

Defined in PrimaryTest

Read (Key Trees) Source # 
Instance details

Defined in PrimaryTest

Show (Key Trees) Source # 
Instance details

Defined in PrimaryTest

ToJSON (Key Trees) Source # 
Instance details

Defined in PrimaryTest

FromJSON (Key Trees) Source # 
Instance details

Defined in PrimaryTest

ToHttpApiData (Key Trees) Source # 
Instance details

Defined in PrimaryTest

FromHttpApiData (Key Trees) Source # 
Instance details

Defined in PrimaryTest

PathPiece (Key Trees) Source # 
Instance details

Defined in PrimaryTest

PersistFieldSql (Key Trees) Source # 
Instance details

Defined in PrimaryTest

Methods

sqlType :: Proxy (Key Trees) -> SqlType #

PersistField (Key Trees) Source # 
Instance details

Defined in PrimaryTest

data Unique Trees Source # 
Instance details

Defined in PrimaryTest

data EntityField Trees typ Source # 
Instance details

Defined in PrimaryTest

data EntityField Trees typ
newtype Key Trees Source # 
Instance details

Defined in PrimaryTest

type PersistEntityBackend Trees Source # 
Instance details

Defined in PrimaryTest

data CompositePrimary Source #

Instances

Instances details
PersistFieldSql CompositePrimary Source # 
Instance details

Defined in PrimaryTest

(TypeError (NoUniqueKeysError CompositePrimary) :: Constraint) => OnlyOneUniqueKey CompositePrimary Source # 
Instance details

Defined in PrimaryTest

(TypeError (MultipleUniqueKeysError CompositePrimary) :: Constraint) => AtLeastOneUniqueKey CompositePrimary Source # 
Instance details

Defined in PrimaryTest

PersistEntity CompositePrimary Source # 
Instance details

Defined in PrimaryTest

PersistField CompositePrimary Source # 
Instance details

Defined in PrimaryTest

SymbolToField "age" CompositePrimary Int Source # 
Instance details

Defined in PrimaryTest

SymbolToField "name" CompositePrimary String Source # 
Instance details

Defined in PrimaryTest

Eq (Key CompositePrimary) Source # 
Instance details

Defined in PrimaryTest

Ord (Key CompositePrimary) Source # 
Instance details

Defined in PrimaryTest

Read (Key CompositePrimary) Source # 
Instance details

Defined in PrimaryTest

Show (Key CompositePrimary) Source # 
Instance details

Defined in PrimaryTest

Generic (Key CompositePrimary) Source # 
Instance details

Defined in PrimaryTest

Associated Types

type Rep (Key CompositePrimary) :: Type -> Type #

ToJSON (Key CompositePrimary) Source # 
Instance details

Defined in PrimaryTest

FromJSON (Key CompositePrimary) Source # 
Instance details

Defined in PrimaryTest

PersistFieldSql (Key CompositePrimary) Source # 
Instance details

Defined in PrimaryTest

PersistField (Key CompositePrimary) Source # 
Instance details

Defined in PrimaryTest

data Unique CompositePrimary Source # 
Instance details

Defined in PrimaryTest

data EntityField CompositePrimary typ Source # 
Instance details

Defined in PrimaryTest

data Key CompositePrimary Source # 
Instance details

Defined in PrimaryTest

type PersistEntityBackend CompositePrimary Source # 
Instance details

Defined in PrimaryTest

type Rep (Key CompositePrimary) Source # 
Instance details

Defined in PrimaryTest

type Rep (Key CompositePrimary) = D1 ('MetaData "Key" "PrimaryTest" "persistent-test-2.12.0.0-2X0gRIy5ByFHRVa0p5LBSa" 'False) (C1 ('MetaCons "CompositePrimaryKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "compositePrimaryKeyname") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "compositePrimaryKeyage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

cleanDB :: (MonadIO m, PersistQuery backend, PersistEntityBackend Foo ~ backend) => ReaderT backend m () Source #