hpqtypes-1.6.0.0: Haskell bindings to libpqtypes

Safe HaskellNone
LanguageHaskell2010

Database.PostgreSQL.PQTypes.FromSQL

Synopsis

Documentation

class (PQFormat t, Storable (PQBase t)) => FromSQL t where Source #

Class which represents "from SQL (libpqtypes) type to Haskell type" transformation.

Minimal complete definition

fromSQL

Associated Types

type PQBase t :: * Source #

Base type (used by libpqtypes).

Methods

fromSQL Source #

Arguments

:: Maybe (PQBase t)

base value (Nothing if NULL was delivered)

-> IO t 

Convert value of base type to target one.

Instances
FromSQL Bool Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Bool :: * Source #

FromSQL Char Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Char :: * Source #

FromSQL Double Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Double :: * Source #

FromSQL Float Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Float :: * Source #

FromSQL Int16 Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Int16 :: * Source #

FromSQL Int32 Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Int32 :: * Source #

FromSQL Int64 Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Int64 :: * Source #

FromSQL Word8 Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Word8 :: * Source #

FromSQL ByteString Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase ByteString :: * Source #

FromSQL ByteString Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase ByteString :: * Source #

FromSQL String Source #

Assumes that source C string is UTF-8, so if you are working with a different encoding, you should not rely on this instance.

Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase String :: * Source #

FromSQL Text Source #

Assumes that source C string is UTF-8, so if you are working with a different encoding, you should not rely on this instance.

Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Text :: * Source #

FromSQL UTCTime Source #

FromSQL instance for ZonedTime doesn't exist because PostgreSQL doesn't provide zone offset information when returning timestamps with time zone in a binary format.

Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase UTCTime :: * Source #

FromSQL Text Source #

Assumes that source C string is UTF-8, so if you are working with a different encoding, you should not rely on this instance

Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Text :: * Source #

FromSQL LocalTime Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase LocalTime :: * Source #

FromSQL TimeOfDay Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase TimeOfDay :: * Source #

FromSQL Day Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Day :: * Source #

Methods

fromSQL :: Maybe (PQBase Day) -> IO Day Source #

FromSQL Interval Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Interval

Associated Types

type PQBase Interval :: * Source #

FromSQL XML Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.XML

Associated Types

type PQBase XML :: * Source #

Methods

fromSQL :: Maybe (PQBase XML) -> IO XML Source #

FromSQL t => FromSQL (Maybe t) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase (Maybe t) :: * Source #

Methods

fromSQL :: Maybe (PQBase (Maybe t)) -> IO (Maybe t) Source #

FromSQL (JSONB ByteString) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.JSON

Associated Types

type PQBase (JSONB ByteString) :: * Source #

FromSQL (JSONB ByteString) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.JSON

Associated Types

type PQBase (JSONB ByteString) :: * Source #

FromSQL (JSONB Value) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.JSON

Associated Types

type PQBase (JSONB Value) :: * Source #

FromSQL (JSON ByteString) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.JSON

Associated Types

type PQBase (JSON ByteString) :: * Source #

FromSQL (JSON ByteString) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.JSON

Associated Types

type PQBase (JSON ByteString) :: * Source #

FromSQL (JSON Value) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.JSON

Associated Types

type PQBase (JSON Value) :: * Source #

CompositeFromSQL t => FromSQL (Composite t) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Composite

Associated Types

type PQBase (Composite t) :: * Source #

Methods

fromSQL :: Maybe (PQBase (Composite t)) -> IO (Composite t) Source #

CompositeFromSQL t => FromSQL (CompositeArray2 t) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Array

Associated Types

type PQBase (CompositeArray2 t) :: * Source #

FromSQL t => FromSQL (Array2 t) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Array

Associated Types

type PQBase (Array2 t) :: * Source #

Methods

fromSQL :: Maybe (PQBase (Array2 t)) -> IO (Array2 t) Source #

CompositeFromSQL t => FromSQL (CompositeArray1 t) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Array

Associated Types

type PQBase (CompositeArray1 t) :: * Source #

FromSQL t => FromSQL (Array1 t) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Array

Associated Types

type PQBase (Array1 t) :: * Source #

Methods

fromSQL :: Maybe (PQBase (Array1 t)) -> IO (Array1 t) Source #