relational-postgresql8-0.2.0.0: PostgreSQL v8.x driver for haskell-relational-record

Copyright2013 Kei Hibino 2014 Shohei Murayama
LicenseBSD3
Maintainershohei.murayama@gmail.com
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell98

Database.Relational.Schema.PostgreSQL8

Description

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

Synopsis

Documentation

type Column = (PgAttribute, PgType) Source #

Type to represent Column information.

normalizeColumn :: String -> String Source #

Normalize column name string to query PostgreSQL system catalog.

notNull :: Column -> Bool Source #

Not-null attribute information of column.

getType Source #

Arguments

:: Map String TypeQ

Type mapping specified by user

-> Column

Column info in system catalog

-> Maybe (String, TypeQ)

Result normalized name and mapped Haskell type

Get column normalized name and column Haskell type.

columnQuerySQL :: Query (String, String) Column Source #

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

primaryKeyLengthQuerySQL :: Query (String, String) Int32 Source #

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

primaryKeyQuerySQL :: Int32 -> Query (String, String) String Source #

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