Copyright | 2013-2019 Kei Hibino |
---|---|
License | BSD3 |
Maintainer | [email protected] |
Stability | experimental |
Portability | unknown |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Database.Relational.Schema.PostgreSQL
Description
This module implements queries to get table schema and table constraint information from system catalog of PostgreSQL.
Synopsis
- config :: Config
- type Column = (PgAttribute, PgType)
- normalizeColumn :: String -> String
- notNull :: Column -> Bool
- getType :: Map String TypeQ -> Column -> Maybe (String, TypeQ)
- columnQuerySQL :: Query (String, String) Column
- primaryKeyLengthQuerySQL :: Query (String, String) Int32
- primaryKeyQuerySQL :: Int32 -> Query (String, String) String
Documentation
type Column = (PgAttribute, PgType) Source #
Type to represent Column information.
normalizeColumn :: String -> String Source #
Normalize column name string to query PostgreSQL system catalog.
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.