relational-query-postgresql-pure-0.1.0.0: The connector of relational-record and postgresql-pure.

Safe HaskellNone
LanguageHaskell2010

Database.Relational.PostgreSQL.Pure.TH

Synopsis

Documentation

makeRelationalRecord Source #

Arguments

:: Name

Type constructor name

-> Q [Dec]

Result declaration

Generate all persistable templates against defined record like type constructor.

makeRelationalRecord' Source #

Arguments

:: Config 
-> 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.

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.

defineTableFromDB' Source #

Arguments

:: 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.

defineTableFromDB Source #

Arguments

:: 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.

inlineVerifiedQuery Source #

Arguments

:: (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 type

-> Relation p r

Object which has Relation type

-> 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.