relational-query-HDBC-0.6.1.2: HDBC instance of relational-query and typed query interface for HDBC

Copyright2013 Kei Hibino
LicenseBSD3
Maintainerex8k.hibino@gmail.com
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Database.HDBC.Query.TH

Description

This module contains templates to generate Haskell record types and HDBC instances correspond to RDB table schema.

Synopsis

Documentation

makeRecordPersistableDefault Source #

Arguments

:: Name

Type constructor name

-> Q [Dec]

Result declaration

Generate all persistable templates against defined record like type constructor.

defineTableDefault' Source #

Arguments

:: 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 using default naming rule.

defineTableDefault Source #

Arguments

:: 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 using default naming rule.

defineTableFromDB' Source #

Arguments

:: IConnection conn 
=> IO conn

Connect action to system catalog database

-> Config

Configuration to generate query with

-> Driver conn

Driver definition

-> String

Schema name

-> String

Table name

-> [Name]

Derivings

-> Q [Dec]

Result declaration

Generate all HDBC templates using system catalog informations with specified config.

defineTableFromDB Source #

Arguments

:: IConnection conn 
=> IO conn

Connect action to system catalog database

-> Driver conn

Driver definition

-> String

Schema name

-> String

Table name

-> [Name]

Derivings

-> Q [Dec]

Result declaration

Generate all HDBC templates using system catalog informations.

inlineVerifiedQuery Source #

Arguments

:: IConnection conn 
=> IO conn

Connect action to system catalog database

-> Name

Top-level variable name which has Relation type

-> Relation p r

Object which has Relation type

-> Config

Configuration to generate SQL

-> QuerySuffix

suffix SQL words

-> String

Variable name to define as inlined query

-> Q [Dec]

Result declarations

Verify composed Query and inline it in compile type.