persistent-relational-record-0.3.0: relational-record on persisten backends.

Safe HaskellNone
LanguageHaskell2010

Database.Persist.Relational.TH

Synopsis

Documentation

deriveGenericForEntityId :: [EntityDef] -> Q [Dec] Source #

standalone deriving Generic instance for entity IDs.

Persistent does not derive Generic instances for `Key a`. see https://github.com/yesodweb/persistent/pull/734#issuecomment-346696921 https://github.com/yesodweb/persistent/issues/578

concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b] Source #

defineMonomorphicProjections :: TableDef -> Q [Dec] Source #

Generate `HasProjection "columnName" (Entity table) columnType` instances

definePiProjection Source #

Arguments

:: Name

table type name

-> Name

columnOffsetsVarName

-> (Integer, Column)

(column idx, (column name, column type))

-> Q [Dec] 

Generate a `HasProjection "columnName" (Entity table) columnType` instance

defineColumnOffsetsVar Source #

Arguments

:: Name

table type name

-> Name

columnOffsetsVarName

-> Name

columnOffsetsEntityVarName

-> Q [Dec]