Hoogle Search
Within LTS Haskell 24.41 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
ghc Language.Haskell.Syntax.Extension No documentation available.
-
ghc Language.Haskell.Syntax.Extension No documentation available.
entityIdFromJSON :: (PersistEntity record, FromJSON record) => Value -> Parser (Entity record)persistent Database.Persist.Class Predefined parseJSON. The input JSON looks like {"id": 1, "name": ...}. The typical usage is:
instance FromJSON (Entity User) where parseJSON = entityIdFromJSON
entityIdToJSON :: (PersistEntity record, ToJSON record) => Entity record -> Valuepersistent Database.Persist.Class Predefined toJSON. The resulting JSON looks like {"id": 1, "name": ...}. The typical usage is:
instance ToJSON (Entity User) where toJSON = entityIdToJSON
persistIdField :: PersistEntity record => EntityField record (Key record)persistent Database.Persist.Class A meta-operation to retrieve the Key EntityField.
entityIdFromJSON :: (PersistEntity record, FromJSON record) => Value -> Parser (Entity record)persistent Database.Persist.Class.PersistEntity Predefined parseJSON. The input JSON looks like {"id": 1, "name": ...}. The typical usage is:
instance FromJSON (Entity User) where parseJSON = entityIdFromJSON
entityIdToJSON :: (PersistEntity record, ToJSON record) => Entity record -> Valuepersistent Database.Persist.Class.PersistEntity Predefined toJSON. The resulting JSON looks like {"id": 1, "name": ...}. The typical usage is:
instance ToJSON (Entity User) where toJSON = entityIdToJSON
persistIdField :: PersistEntity record => EntityField record (Key record)persistent Database.Persist.Class.PersistEntity A meta-operation to retrieve the Key EntityField.
-
persistent Database.Persist.EntityDef The definition for the entity's primary key ID.
EntityIdField :: FieldDef -> EntityIdDefpersistent Database.Persist.EntityDef The entity has a single key column, and it is a surrogate key - that is, you can't go from rec -> Key rec.