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

Copyright(C) 2016 Takahiro Himura
LicenseBSD3
MaintainerTakahiro Himura <taka@himura.jp>
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Database.Persist.Relational

Description

This module works as a bridge between Haskell Relational Record and Persistent. It uses the persistent entities definition instead of obtaining schema from DB at compilation time.

See: https://github.com/himura/persistent-relational-record#readme

Synopsis

Documentation

runQuery Source #

Arguments

:: (MonadResource m, MonadReader env m, HasPersistBackend env, BaseBackend env ~ SqlBackend, FromSql PersistValue a, ToSql PersistValue p) 
=> Query p a

Query to get record type a requires parameter p

-> p

Parameter type

-> ConduitT () a m () 

Execute a HRR Query and return the stream of its results.

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