Portability  unknown 

Stability  experimental 
Maintainer  ex8k.hibino@gmail.com 
Safe Haskell  None 
This module defines typed SQLs derived from type informations.
 specifiedKey :: PersistableWidth p => Pi a p > Relation () a > Relation p a
 unique :: PersistableWidth p => Key Unique a p > Relation () a > Relation p a
 primary' :: PersistableWidth p => Key Primary a p > Relation () a > Relation p a
 primary :: HasConstraintKey Primary a p => Relation () a > Relation p a
 updateByConstraintKey :: Table r > Key c r p > KeyUpdate p r
 primaryUpdate :: HasConstraintKey Primary r p => Table r > KeyUpdate p r
 updateValuesWithKey :: ToSql q r => Pi r p > r > [q]
 derivedUniqueRelation :: TableDerivable r => Key Unique r k > Projection c k > UniqueRelation () c r
Query derivation
:: PersistableWidth p  
=> Pi a p  Unique key proof object which record type is 
> Relation () a 

> Relation p a  Result restricted 
Query restricted with specified key.
:: PersistableWidth p  
=> Key Unique a p  Unique key proof object which record type is 
> Relation () a 

> Relation p a  Result restricted 
Query restricted with specified unique key.
:: PersistableWidth p  
=> Key Primary a p  Primary key proof object which record type is 
> Relation () a 

> Relation p a  Result restricted 
Query restricted with specified primary key.
:: HasConstraintKey Primary a p  
=> Relation () a 

> Relation p a  Result restricted 
Query restricted with infered primary key.
Update derivation
:: Table r 

> Key c r p  Key with constraint 
> KeyUpdate p r  Result typed 
Typed KeyUpdate
using specified constraint key.
:: HasConstraintKey Primary r p  
=> Table r 

> KeyUpdate p r  Result typed 
Typed KeyUpdate
using infered primary key.
updateValuesWithKey :: ToSql q r => Pi r p > r > [q]Source
Convert from Haskell type r
into SQL value q
list expected by update form like
UPDATE <table> SET c0 = ?, c1 = ?, ..., cn = ? WHERE key0 = ? AND key1 = ? AND key2 = ? ...
using derived RecordToSql
proof object.
Derived objects from table
:: TableDerivable r  
=> Key Unique r k  Unique key proof object which record type is 
> Projection c k  Unique key value to specify. 
> UniqueRelation () c r  Result restricted 
UniqueRelation
infered from table.