| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
PersistUniqueTest
Documentation
type OnlyPrimaryKeyId = Key OnlyPrimaryKey Source #
data OnlyPrimaryKey Source #
Constructors
| OnlyPrimaryKey | |
Fields
| |
Instances
Instances
| Show Ba Source # | |||||||||||||||||
| Eq Ba Source # | |||||||||||||||||
| PersistEntity Ba Source # | |||||||||||||||||
Defined in PersistUniqueTest Associated Types
Methods keyToValues :: Key Ba -> [PersistValue] # keyFromValues :: [PersistValue] -> Either Text (Key Ba) # persistIdField :: EntityField Ba (Key Ba) # entityDef :: proxy Ba -> EntityDef # persistFieldDef :: EntityField Ba typ -> FieldDef # toPersistFields :: Ba -> [PersistValue] # fromPersistValues :: [PersistValue] -> Either Text Ba # tabulateEntityA :: Applicative f => (forall a. EntityField Ba a -> f a) -> f (Entity Ba) # tabulateEntityApply :: Apply f => (forall a. EntityField Ba a -> f a) -> f (Entity Ba) # persistUniqueKeys :: Ba -> [Unique Ba] # persistUniqueToFieldNames :: Unique Ba -> NonEmpty (FieldNameHS, FieldNameDB) # persistUniqueToValues :: Unique Ba -> [PersistValue] # fieldLens :: EntityField Ba field -> forall (f :: Type -> Type). Functor f => (field -> f field) -> Entity Ba -> f (Entity Ba) # | |||||||||||||||||
| SafeToInsert Ba Source # | |||||||||||||||||
Defined in PersistUniqueTest | |||||||||||||||||
| PersistField Ba Source # | |||||||||||||||||
Defined in PersistUniqueTest | |||||||||||||||||
| AtLeastOneUniqueKey Ba Source # | |||||||||||||||||
Defined in PersistUniqueTest | |||||||||||||||||
| OnlyOneUniqueKey Ba Source # | |||||||||||||||||
Defined in PersistUniqueTest Methods onlyUniqueP :: Ba -> Unique Ba # | |||||||||||||||||
| PersistFieldSql Ba Source # | |||||||||||||||||
| ToBackendKey SqlBackend Ba Source # | |||||||||||||||||
Defined in PersistUniqueTest Methods toBackendKey :: Key Ba -> BackendKey SqlBackend # fromBackendKey :: BackendKey SqlBackend -> Key Ba # | |||||||||||||||||
| SymbolToField "baz" Ba Int Source # | |||||||||||||||||
Defined in PersistUniqueTest Methods | |||||||||||||||||
| SymbolToField "foo" Ba Int Source # | |||||||||||||||||
Defined in PersistUniqueTest Methods | |||||||||||||||||
| SymbolToField "id" Ba (Key Ba) Source # | |||||||||||||||||
Defined in PersistUniqueTest Methods symbolToField :: EntityField Ba (Key Ba) # | |||||||||||||||||
| FromJSON (Key Ba) Source # | |||||||||||||||||
| ToJSON (Key Ba) Source # | |||||||||||||||||
| Read (Key Ba) Source # | |||||||||||||||||
| Show (Key Ba) Source # | |||||||||||||||||
| Show (Unique Ba) Source # | |||||||||||||||||
| Eq (Key Ba) Source # | |||||||||||||||||
| Eq (Unique Ba) Source # | |||||||||||||||||
| Ord (Key Ba) Source # | |||||||||||||||||
| FromHttpApiData (Key Ba) Source # | |||||||||||||||||
Defined in PersistUniqueTest | |||||||||||||||||
| ToHttpApiData (Key Ba) Source # | |||||||||||||||||
Defined in PersistUniqueTest Methods toUrlPiece :: Key Ba -> Text # toEncodedUrlPiece :: Key Ba -> Builder # toHeader :: Key Ba -> ByteString # toQueryParam :: Key Ba -> Text # toEncodedQueryParam :: Key Ba -> Builder # | |||||||||||||||||
| PathPiece (Key Ba) Source # | |||||||||||||||||
Defined in PersistUniqueTest | |||||||||||||||||
| PersistField (Key Ba) Source # | |||||||||||||||||
Defined in PersistUniqueTest Methods toPersistValue :: Key Ba -> PersistValue # fromPersistValue :: PersistValue -> Either Text (Key Ba) # | |||||||||||||||||
| PersistFieldSql (Key Ba) Source # | |||||||||||||||||
| data EntityField Ba typ Source # | |||||||||||||||||
| newtype Key Ba Source # | |||||||||||||||||
Defined in PersistUniqueTest | |||||||||||||||||
| type PersistEntityBackend Ba Source # | |||||||||||||||||
Defined in PersistUniqueTest | |||||||||||||||||
| data Unique Ba Source # | |||||||||||||||||
Defined in PersistUniqueTest | |||||||||||||||||
Instances
| Show Fo Source # | |||||||||||||||||
| Eq Fo Source # | |||||||||||||||||
| PersistEntity Fo Source # | |||||||||||||||||
Defined in PersistUniqueTest Associated Types
Methods keyToValues :: Key Fo -> [PersistValue] # keyFromValues :: [PersistValue] -> Either Text (Key Fo) # persistIdField :: EntityField Fo (Key Fo) # entityDef :: proxy Fo -> EntityDef # persistFieldDef :: EntityField Fo typ -> FieldDef # toPersistFields :: Fo -> [PersistValue] # fromPersistValues :: [PersistValue] -> Either Text Fo # tabulateEntityA :: Applicative f => (forall a. EntityField Fo a -> f a) -> f (Entity Fo) # tabulateEntityApply :: Apply f => (forall a. EntityField Fo a -> f a) -> f (Entity Fo) # persistUniqueKeys :: Fo -> [Unique Fo] # persistUniqueToFieldNames :: Unique Fo -> NonEmpty (FieldNameHS, FieldNameDB) # persistUniqueToValues :: Unique Fo -> [PersistValue] # fieldLens :: EntityField Fo field -> forall (f :: Type -> Type). Functor f => (field -> f field) -> Entity Fo -> f (Entity Fo) # | |||||||||||||||||
| SafeToInsert Fo Source # | |||||||||||||||||
Defined in PersistUniqueTest | |||||||||||||||||
| PersistField Fo Source # | |||||||||||||||||
Defined in PersistUniqueTest | |||||||||||||||||
| AtLeastOneUniqueKey Fo Source # | |||||||||||||||||
Defined in PersistUniqueTest | |||||||||||||||||
| (TypeError (MultipleUniqueKeysError Fo) :: Constraint) => OnlyOneUniqueKey Fo Source # | |||||||||||||||||
Defined in PersistUniqueTest Methods onlyUniqueP :: Fo -> Unique Fo # | |||||||||||||||||
| PersistFieldSql Fo Source # | |||||||||||||||||
| SymbolToField "bar" Fo Int Source # | |||||||||||||||||
Defined in PersistUniqueTest Methods | |||||||||||||||||
| SymbolToField "foo" Fo Int Source # | |||||||||||||||||
Defined in PersistUniqueTest Methods | |||||||||||||||||
| SymbolToField "id" Fo (Key Fo) Source # | |||||||||||||||||
Defined in PersistUniqueTest Methods symbolToField :: EntityField Fo (Key Fo) # | |||||||||||||||||
| FromJSON (Key Fo) Source # | |||||||||||||||||
| ToJSON (Key Fo) Source # | |||||||||||||||||
| Read (Key Fo) Source # | |||||||||||||||||
| Show (Key Fo) Source # | |||||||||||||||||
| Show (Unique Fo) Source # | |||||||||||||||||
| Eq (Key Fo) Source # | |||||||||||||||||
| Eq (Unique Fo) Source # | |||||||||||||||||
| Ord (Key Fo) Source # | |||||||||||||||||
| FromHttpApiData (Key Fo) Source # | |||||||||||||||||
Defined in PersistUniqueTest | |||||||||||||||||
| ToHttpApiData (Key Fo) Source # | |||||||||||||||||
Defined in PersistUniqueTest Methods toUrlPiece :: Key Fo -> Text # toEncodedUrlPiece :: Key Fo -> Builder # toHeader :: Key Fo -> ByteString # toQueryParam :: Key Fo -> Text # toEncodedQueryParam :: Key Fo -> Builder # | |||||||||||||||||
| PathPiece (Key Fo) Source # | |||||||||||||||||
Defined in PersistUniqueTest | |||||||||||||||||
| PersistField (Key Fo) Source # | |||||||||||||||||
Defined in PersistUniqueTest Methods toPersistValue :: Key Fo -> PersistValue # fromPersistValue :: PersistValue -> Either Text (Key Fo) # | |||||||||||||||||
| PersistFieldSql (Key Fo) Source # | |||||||||||||||||
| data EntityField Fo typ Source # | |||||||||||||||||
| newtype Key Fo Source # | |||||||||||||||||
| type PersistEntityBackend Fo Source # | |||||||||||||||||
Defined in PersistUniqueTest | |||||||||||||||||
| data Unique Fo Source # | |||||||||||||||||
Defined in PersistUniqueTest | |||||||||||||||||
shouldCompile :: (OnlyOneUniqueKey OnlyPrimaryKey, AtLeastOneUniqueKey OnlyPrimaryKey) => IO () Source #
cleanDB :: forall (m :: Type -> Type) backend. (MonadIO m, PersistQuery backend, PersistEntityBackend Fo ~ backend) => ReaderT backend m () Source #
specsWith :: forall (m :: Type -> Type). Runner SqlBackend m => RunDb SqlBackend m -> Spec Source #