mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-11-30 01:24:29 +03:00
relational-query-HDBC: renamed.
This commit is contained in:
parent
7709a310d5
commit
ff5b48099f
@ -15,6 +15,7 @@
|
||||
-- This module contains templates to generate Haskell record types
|
||||
-- and HDBC instances correspond to RDB table schema.
|
||||
module Database.HDBC.Query.TH (
|
||||
makeRelationalRecord,
|
||||
makeRecordPersistableDefault,
|
||||
|
||||
defineTableDefault',
|
||||
@ -60,14 +61,20 @@ defineInstancesForSqlValue typeCon = do
|
||||
|]
|
||||
|
||||
-- | Generate all persistable templates against defined record like type constructor.
|
||||
makeRecordPersistableDefault :: Name -- ^ Type constructor name
|
||||
-> Q [Dec] -- ^ Result declaration
|
||||
makeRecordPersistableDefault recTypeName = do
|
||||
makeRelationalRecord :: Name -- ^ Type constructor name
|
||||
-> Q [Dec] -- ^ Result declaration
|
||||
makeRelationalRecord recTypeName = do
|
||||
rr <- Relational.makeRelationalRecordDefault recTypeName
|
||||
((typeCon, _), _) <- reifyRecordType recTypeName
|
||||
ps <- defineInstancesForSqlValue typeCon
|
||||
return $ rr ++ ps
|
||||
|
||||
{-# DEPRECATED makeRecordPersistableDefault "Use makeRelationalRecord instead of this." #-}
|
||||
-- | Deprecated. use 'makeRelationalRecord'.
|
||||
makeRecordPersistableDefault :: Name -- ^ Type constructor name
|
||||
-> Q [Dec] -- ^ Result declaration
|
||||
makeRecordPersistableDefault = makeRelationalRecord
|
||||
|
||||
-- | Generate all HDBC templates about table except for constraint keys.
|
||||
defineTableDefault' :: Config -- ^ Configuration to generate query with
|
||||
-> String -- ^ Schema name
|
||||
|
Loading…
Reference in New Issue
Block a user