| Copyright | (c) Eitan Chatav 2019 |
|---|---|
| Maintainer | eitan@morphism.tech |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
Squeal.PostgreSQL.Session.Oid
Contents
Description
Object identifiers are used internally by PostgreSQL as primary keys. They are needed to correctly encode statement parameters.
Synopsis
- data Oid
- class OidOf (db :: SchemasType) (pg :: PGType) where
- class OidOfArray (db :: SchemasType) (pg :: PGType) where
- oidOfArray :: ReaderT (K Connection db) IO Oid
- class OidOfNull (db :: SchemasType) (ty :: NullType) where
- class OidOfField (db :: SchemasType) (field :: (Symbol, NullType)) where
- oidOfField :: ReaderT (K Connection db) IO Oid
Oids
Instances
| Eq Oid | |
| Ord Oid | |
| Read Oid | |
| Show Oid | |
| Storable Oid | |
Defined in Database.PostgreSQL.LibPQ | |
| IsPG Oid Source # | |
| FromPG Oid Source # | |
Defined in Squeal.PostgreSQL.Session.Decode | |
| Inline Oid Source # | |
| ToPG db Oid Source # | |
Defined in Squeal.PostgreSQL.Session.Encode | |
| type PG Oid Source # | |
Defined in Squeal.PostgreSQL.Type.PG | |
class OidOf (db :: SchemasType) (pg :: PGType) where Source #
>>>:set -XTypeApplications>>>conn <- connectdb @'[] "host=localhost port=5432 dbname=exampledb user=postgres password=postgres">>>runReaderT (oidOf @'[] @'PGbool) connOid 16
>>>finish conn
Instances
class OidOfArray (db :: SchemasType) (pg :: PGType) where Source #
The Oid of an array
Methods
oidOfArray :: ReaderT (K Connection db) IO Oid Source #
Instances
class OidOfNull (db :: SchemasType) (ty :: NullType) where Source #
class OidOfField (db :: SchemasType) (field :: (Symbol, NullType)) where Source #
The Oid of a field
Methods
oidOfField :: ReaderT (K Connection db) IO Oid Source #
Instances
| OidOfNull db ty => OidOfField db (fld ::: ty) Source # | |
Defined in Squeal.PostgreSQL.Session.Oid Methods oidOfField :: ReaderT (K Connection db) IO Oid Source # | |