relational-query-HDBC-0.0.1.1: HDBC instance of relational join and typed query for HDBC

Portabilityunknown
Stabilityexperimental
Maintainerex8k.hibino@gmail.com
Safe HaskellNone

Database.HDBC.Query.TH

Description

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

Synopsis

Documentation

makeRecordPersistableDefaultSource

Arguments

:: Name

Type constructor name

-> Q [Dec]

Resutl 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

-> [ConName]

Derivings

-> Q [Dec]

Result declaration

Generate all HDBC templates about table except for constraint keys using default naming rule.

defineTableDefaultSource

Arguments

:: Config

Configuration to generate query with

-> String

Schema name

-> String

Table name

-> [(String, TypeQ)]

List of column name and type

-> [ConName]

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

-> [ConName]

Derivings

-> Q [Dec]

Result declaration

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

defineTableFromDBSource

Arguments

:: IConnection conn 
=> IO conn

Connect action to system catalog database

-> Driver conn

Driver definition

-> String

Schema name

-> String

Table name

-> [ConName]

Derivings

-> Q [Dec]

Result declaration

Generate all HDBC templates using system catalog informations.

inlineVerifiedQuerySource

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.