-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | PostgreSQL v8.x driver for haskell-relational-record -- -- This package contains a driver of old PostgreSQL for -- haskell-relational-record. @package relational-postgresql8 @version 0.2.0.0 module Database.Relational.Schema.PgCatalog8.Config -- | Configuration parameter against PostgreSQL v8.x config :: Config module Database.Relational.Schema.PgCatalog8.PgAttribute data PgAttribute PgAttribute :: !Int32 -> !String -> !Int32 -> !Int32 -> !Int16 -> !Int16 -> !Int32 -> !Int32 -> !Int32 -> !Bool -> !Char -> !Char -> !Bool -> !Bool -> !Bool -> !Bool -> !Int32 -> PgAttribute [attrelid] :: PgAttribute -> !Int32 [attname] :: PgAttribute -> !String [atttypid] :: PgAttribute -> !Int32 [attstattarget] :: PgAttribute -> !Int32 [attlen] :: PgAttribute -> !Int16 [attnum] :: PgAttribute -> !Int16 [attndims] :: PgAttribute -> !Int32 [attcacheoff] :: PgAttribute -> !Int32 [atttypmod] :: PgAttribute -> !Int32 [attbyval] :: PgAttribute -> !Bool [attstorage] :: PgAttribute -> !Char [attalign] :: PgAttribute -> !Char [attnotnull] :: PgAttribute -> !Bool [atthasdef] :: PgAttribute -> !Bool [attisdropped] :: PgAttribute -> !Bool [attislocal] :: PgAttribute -> !Bool [attinhcount] :: PgAttribute -> !Int32 attinhcount' :: Pi PgAttribute Int32 attislocal' :: Pi PgAttribute Bool attisdropped' :: Pi PgAttribute Bool atthasdef' :: Pi PgAttribute Bool attnotnull' :: Pi PgAttribute Bool attalign' :: Pi PgAttribute Char attstorage' :: Pi PgAttribute Char attbyval' :: Pi PgAttribute Bool atttypmod' :: Pi PgAttribute Int32 attcacheoff' :: Pi PgAttribute Int32 attndims' :: Pi PgAttribute Int32 attnum' :: Pi PgAttribute Int16 attlen' :: Pi PgAttribute Int16 attstattarget' :: Pi PgAttribute Int32 atttypid' :: Pi PgAttribute Int32 attname' :: Pi PgAttribute String attrelid' :: Pi PgAttribute Int32 insertQueryPgAttribute :: forall p_a7Lo. Relation p_a7Lo PgAttribute -> InsertQuery p_a7Lo insertPgAttribute :: Insert PgAttribute pgAttribute :: Relation () PgAttribute tableOfPgAttribute :: Table PgAttribute columnOffsetsPgAttribute :: Array Int Int instance GHC.Show.Show Database.Relational.Schema.PgCatalog8.PgAttribute.PgAttribute instance Database.Record.Persistable.PersistableWidth Database.Relational.Schema.PgCatalog8.PgAttribute.PgAttribute instance Database.Relational.Query.Pure.ProductConstructor (GHC.Int.Int32 -> GHC.Base.String -> GHC.Int.Int32 -> GHC.Int.Int32 -> GHC.Int.Int16 -> GHC.Int.Int16 -> GHC.Int.Int32 -> GHC.Int.Int32 -> GHC.Int.Int32 -> GHC.Types.Bool -> GHC.Types.Char -> GHC.Types.Char -> GHC.Types.Bool -> GHC.Types.Bool -> GHC.Types.Bool -> GHC.Types.Bool -> GHC.Int.Int32 -> Database.Relational.Schema.PgCatalog8.PgAttribute.PgAttribute) instance Database.Relational.Query.Table.TableDerivable Database.Relational.Schema.PgCatalog8.PgAttribute.PgAttribute module Database.Relational.Schema.PgCatalog8.PgClass data PgClass PgClass :: !Int32 -> !String -> !Int32 -> PgClass [oid] :: PgClass -> !Int32 [relname] :: PgClass -> !String [relnamespace] :: PgClass -> !Int32 relnamespace' :: Pi PgClass Int32 relname' :: Pi PgClass String oid' :: Pi PgClass Int32 insertQueryPgClass :: forall p_acah. Relation p_acah PgClass -> InsertQuery p_acah insertPgClass :: Insert PgClass pgClass :: Relation () PgClass tableOfPgClass :: Table PgClass columnOffsetsPgClass :: Array Int Int instance GHC.Show.Show Database.Relational.Schema.PgCatalog8.PgClass.PgClass instance Database.Record.Persistable.PersistableWidth Database.Relational.Schema.PgCatalog8.PgClass.PgClass instance Database.Relational.Query.Pure.ProductConstructor (GHC.Int.Int32 -> GHC.Base.String -> GHC.Int.Int32 -> Database.Relational.Schema.PgCatalog8.PgClass.PgClass) instance Database.Relational.Query.Table.TableDerivable Database.Relational.Schema.PgCatalog8.PgClass.PgClass module Database.Relational.Schema.PgCatalog8.PgConstraint data PgConstraint PgConstraint :: !Char -> !Int32 -> PgConstraint [contype] :: PgConstraint -> !Char [conrelid] :: PgConstraint -> !Int32 conrelid' :: Pi PgConstraint Int32 contype' :: Pi PgConstraint Char insertQueryPgConstraint :: forall p_acPf. Relation p_acPf PgConstraint -> InsertQuery p_acPf insertPgConstraint :: Insert PgConstraint pgConstraint :: Relation () PgConstraint tableOfPgConstraint :: Table PgConstraint columnOffsetsPgConstraint :: Array Int Int instance GHC.Show.Show Database.Relational.Schema.PgCatalog8.PgConstraint.PgConstraint instance Database.Record.Persistable.PersistableWidth Database.Relational.Schema.PgCatalog8.PgConstraint.PgConstraint instance Database.Relational.Query.Pure.ProductConstructor (GHC.Types.Char -> GHC.Int.Int32 -> Database.Relational.Schema.PgCatalog8.PgConstraint.PgConstraint) instance Database.Relational.Query.Table.TableDerivable Database.Relational.Schema.PgCatalog8.PgConstraint.PgConstraint module Database.Relational.Schema.PgCatalog8.PgNamespace data PgNamespace PgNamespace :: !Int32 -> !String -> PgNamespace [oid] :: PgNamespace -> !Int32 [nspname] :: PgNamespace -> !String nspname' :: Pi PgNamespace String oid' :: Pi PgNamespace Int32 insertQueryPgNamespace :: forall p_adlD. Relation p_adlD PgNamespace -> InsertQuery p_adlD insertPgNamespace :: Insert PgNamespace pgNamespace :: Relation () PgNamespace tableOfPgNamespace :: Table PgNamespace columnOffsetsPgNamespace :: Array Int Int instance GHC.Show.Show Database.Relational.Schema.PgCatalog8.PgNamespace.PgNamespace instance Database.Record.Persistable.PersistableWidth Database.Relational.Schema.PgCatalog8.PgNamespace.PgNamespace instance Database.Relational.Query.Pure.ProductConstructor (GHC.Int.Int32 -> GHC.Base.String -> Database.Relational.Schema.PgCatalog8.PgNamespace.PgNamespace) instance Database.Relational.Query.Table.TableDerivable Database.Relational.Schema.PgCatalog8.PgNamespace.PgNamespace module Database.Relational.Schema.PgCatalog8.PgType data PgType PgType :: !Int32 -> !String -> !Int32 -> !Int32 -> !Int16 -> !Bool -> !Char -> !Bool -> !Char -> !Int32 -> !Int32 -> !Char -> !Char -> !Bool -> !Int32 -> !Int32 -> !Int32 -> !(Maybe String) -> PgType [oid] :: PgType -> !Int32 [typname] :: PgType -> !String [typnamespace] :: PgType -> !Int32 [typowner] :: PgType -> !Int32 [typlen] :: PgType -> !Int16 [typbyval] :: PgType -> !Bool [typtype] :: PgType -> !Char [typisdefined] :: PgType -> !Bool [typdelim] :: PgType -> !Char [typrelid] :: PgType -> !Int32 [typelem] :: PgType -> !Int32 [typalign] :: PgType -> !Char [typstorage] :: PgType -> !Char [typnotnull] :: PgType -> !Bool [typbasetype] :: PgType -> !Int32 [typtypmod] :: PgType -> !Int32 [typndims] :: PgType -> !Int32 [typdefault] :: PgType -> !(Maybe String) typdefault' :: Pi PgType (Maybe String) typndims' :: Pi PgType Int32 typtypmod' :: Pi PgType Int32 typbasetype' :: Pi PgType Int32 typnotnull' :: Pi PgType Bool typstorage' :: Pi PgType Char typalign' :: Pi PgType Char typelem' :: Pi PgType Int32 typrelid' :: Pi PgType Int32 typdelim' :: Pi PgType Char typisdefined' :: Pi PgType Bool typtype' :: Pi PgType Char typbyval' :: Pi PgType Bool typlen' :: Pi PgType Int16 typowner' :: Pi PgType Int32 typnamespace' :: Pi PgType Int32 typname' :: Pi PgType String oid' :: Pi PgType Int32 insertQueryPgType :: forall p_adUJ. Relation p_adUJ PgType -> InsertQuery p_adUJ insertPgType :: Insert PgType pgType :: Relation () PgType tableOfPgType :: Table PgType columnOffsetsPgType :: Array Int Int instance GHC.Show.Show Database.Relational.Schema.PgCatalog8.PgType.PgType instance Database.Record.Persistable.PersistableWidth Database.Relational.Schema.PgCatalog8.PgType.PgType instance Database.Relational.Query.Pure.ProductConstructor (GHC.Int.Int32 -> GHC.Base.String -> GHC.Int.Int32 -> GHC.Int.Int32 -> GHC.Int.Int16 -> GHC.Types.Bool -> GHC.Types.Char -> GHC.Types.Bool -> GHC.Types.Char -> GHC.Int.Int32 -> GHC.Int.Int32 -> GHC.Types.Char -> GHC.Types.Char -> GHC.Types.Bool -> GHC.Int.Int32 -> GHC.Int.Int32 -> GHC.Int.Int32 -> GHC.Base.Maybe GHC.Base.String -> Database.Relational.Schema.PgCatalog8.PgType.PgType) instance Database.Relational.Query.Table.TableDerivable Database.Relational.Schema.PgCatalog8.PgType.PgType -- | This module implements queries to get table schema and table -- constraint informations from system catalog of PostgreSQL. module Database.Relational.Schema.PostgreSQL8 -- | Type to represent Column information. type Column = (PgAttribute, PgType) -- | Normalize column name string to query PostgreSQL system catalog. normalizeColumn :: String -> String -- | Not-null attribute information of column. notNull :: Column -> Bool -- | Get column normalized name and column Haskell type. getType :: Map String TypeQ -> Column -> Maybe (String, TypeQ) -- | Phantom typed Query to get Column from schema name and -- table name. columnQuerySQL :: Query (String, String) Column -- | Phantom typed Query to get primary key length from schema name -- and table name. primaryKeyLengthQuerySQL :: Query (String, String) Int32 -- | Phantom typed Query to get primary key name from schema name -- and table name. primaryKeyQuerySQL :: Int32 -> Query (String, String) String -- | This module provides driver implementation to load PostgreSQL system -- catalog via HDBC. module Database.HDBC.Schema.PostgreSQL8 -- | Driver implementation driverPostgreSQL :: IConnection conn => Driver conn instance Database.Record.FromSql.FromSql Database.HDBC.SqlValue.SqlValue Database.Relational.Schema.PgCatalog8.PgType.PgType instance Database.Record.ToSql.ToSql Database.HDBC.SqlValue.SqlValue Database.Relational.Schema.PgCatalog8.PgType.PgType instance Database.Record.FromSql.FromSql Database.HDBC.SqlValue.SqlValue Database.Relational.Schema.PgCatalog8.PgAttribute.PgAttribute instance Database.Record.ToSql.ToSql Database.HDBC.SqlValue.SqlValue Database.Relational.Schema.PgCatalog8.PgAttribute.PgAttribute