Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- makeRelationalRecord :: Name -> Q [Dec]
- makeRelationalRecord' :: Config -> Name -> Q [Dec]
- defineTableDefault' :: Config -> String -> String -> [(String, TypeQ)] -> [Name] -> Q [Dec]
- defineTableDefault :: Config -> String -> String -> [(String, TypeQ)] -> [Name] -> [Int] -> Maybe Int -> Q [Dec]
- defineTableFromDB' :: IO Connection -> Driver -> String -> String -> [(String, TypeQ)] -> [Name] -> Q [Dec]
- defineTableFromDB :: IO Connection -> Driver -> String -> String -> [Name] -> Q [Dec]
- inlineVerifiedQuery :: forall p r. (KnownNat (Length p), KnownNat (Length r), IsHomotupleItem (Length p) Oid, IsHomotupleItem (Length r) Oid, IsHomotupleItem (Length r) ColumnInfo, IsHomolisttuple (Length p) Oid, IsHomolisttuple (Length r) Oid, IsHomolisttuple (Length r) ColumnInfo) => IO Connection -> Name -> Relation p r -> Config -> [Keyword] -> String -> Q [Dec]
Documentation
Generate all persistable templates against defined record like type constructor.
makeRelationalRecord' Source #
Generate all persistable templates against defined record like type constructor.
:: Config | Configuration to generate query with |
-> String | Schema name |
-> String | Table name |
-> [(String, TypeQ)] | List of column name and type |
-> [Name] | Derivings |
-> Q [Dec] | Result declaration |
Generate all HDBC templates about table except for constraint keys.
:: Config | Configuration to generate query with |
-> String | Schema name |
-> String | Table name |
-> [(String, TypeQ)] | List of column name and type |
-> [Name] | Derivings |
-> [Int] | Indexes to represent primary key |
-> Maybe Int | Index of not-null key |
-> Q [Dec] | Result declaration |
Generate all HDBC templates about table.
:: IO Connection | Connect action to system catalog database |
-> Driver | Driver definition |
-> String | Schema name |
-> String | Table name |
-> [(String, TypeQ)] | Additional column-name and column-type mapping to overwrite default |
-> [Name] | Derivings |
-> Q [Dec] | Result declaration |
Generate all HDBC templates using system catalog informations with specified config.
:: IO Connection | Connect action to system catalog database |
-> Driver | Driver definition |
-> String | Schema name |
-> String | Table name |
-> [Name] | Derivings |
-> Q [Dec] | Result declaration |
Generate all HDBC templates using system catalog informations.
:: (KnownNat (Length p), KnownNat (Length r), IsHomotupleItem (Length p) Oid, IsHomotupleItem (Length r) Oid, IsHomotupleItem (Length r) ColumnInfo, IsHomolisttuple (Length p) Oid, IsHomolisttuple (Length r) Oid, IsHomolisttuple (Length r) ColumnInfo) | |
=> IO Connection | Connect action to system catalog database |
-> Name | Top-level variable name which has |
-> Relation p r | Object which has |
-> Config | Configuration to generate SQL |
-> [Keyword] | suffix SQL words. for example, `[FOR, UPDATE]`, `[FETCH, FIRST, "3", ROWS, ONLY]` ... |
-> String | Variable name to define as inlined query |
-> Q [Dec] | Result declarations |
Verify composed Query
and inline it in compile type.