Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
liftPersist :: (MonadIO m, MonadReader backend m) => ReaderT backend IO b -> m bpersistent Database.Persist.Class No documentation available.
toPersistFields :: PersistEntity record => record -> [PersistValue]persistent Database.Persist.Class A meta-operation to get the database fields of a record.
toPersistValue :: PersistField a => a -> PersistValuepersistent Database.Persist.Class No documentation available.
toPersistValueJSON :: ToJSON a => a -> PersistValuepersistent Database.Persist.Class Convenience function for getting a free PersistField instance from a type with JSON instances. Example usage in combination with fromPersistValueJSON:
instance PersistField MyData where fromPersistValue = fromPersistValueJSON toPersistValue = toPersistValueJSON
newtype
ViaPersistEntity recordpersistent Database.Persist.Class.PersistEntity Newtype wrapper for optionally deriving typeclass instances on PersistEntity keys.
ViaPersistEntity :: Key record -> ViaPersistEntity recordpersistent Database.Persist.Class.PersistEntity No documentation available.
fromPersistValueEnum :: (Enum a, Bounded a) => PersistValue -> Either Text apersistent Database.Persist.Class.PersistEntity Convenience function for getting a free PersistField instance from a type with an Enum instance. This function also requires a Bounded instance to improve the reporting of errors. Example usage in combination with toPersistValueEnum:
data SeverityLevel = Low | Medium | Critical | High deriving (Enum, Bounded) instance PersistField SeverityLevel where fromPersistValue = fromPersistValueEnum toPersistValue = toPersistValueEnum
fromPersistValueJSON :: FromJSON a => PersistValue -> Either Text apersistent Database.Persist.Class.PersistEntity Convenience function for getting a free PersistField instance from a type with JSON instances. The JSON parser used will accept JSON values other that object and arrays. So, if your instance serializes the data to a JSON string, this will still work. Example usage in combination with toPersistValueJSON:
instance PersistField MyData where fromPersistValue = fromPersistValueJSON toPersistValue = toPersistValueJSON
fromPersistValues :: PersistEntity record => [PersistValue] -> Either Text recordpersistent Database.Persist.Class.PersistEntity A lower-level operation to convert from database values to a Haskell record.
toPersistFields :: PersistEntity record => record -> [PersistValue]persistent Database.Persist.Class.PersistEntity A meta-operation to get the database fields of a record.