relational-schemas-0.1.0.0: RDBMSs' schema templates for relational-query

Portabilityunknown
Stabilityexperimental
Maintainerex8k.hibino@gmail.com
Safe HaskellNone

Database.Relational.Schema.IBMDB2

Description

This module implements queries to get table schema and table constraint informations from system catalog of IBM DB2.

Synopsis

Documentation

normalizeColumn :: String -> StringSource

Normalize column name string to query DB2 system catalog

notNull :: Columns -> BoolSource

Not-null attribute information of column.

getTypeSource

Arguments

:: Map String TypeQ

Type mapping specified by user

-> Columns

Column info in system catalog

-> Maybe (String, TypeQ)

Result normalized name and mapped Haskell type

Get column normalized name and column Haskell type.

columnsQuerySQL :: Query (String, String) ColumnsSource

Phantom typed Query to get Columns from schema name and table name.

primaryKeyQuerySQL :: Query (String, String) StringSource

Phantom typed Query to get primary key name from schema name and table name.