hpqtypes-1.6.1.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.

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 :: Type Source #

FromSQL Char Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Char :: Type Source #

FromSQL Double Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Double :: Type Source #

FromSQL Float Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Float :: Type Source #

FromSQL Int16 Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Int16 :: Type Source #

FromSQL Int32 Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Int32 :: Type Source #

FromSQL Int64 Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Int64 :: Type Source #

FromSQL Word8 Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Word8 :: Type Source #

FromSQL ByteString Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase ByteString :: Type Source #

FromSQL ByteString Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase ByteString :: Type 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 :: Type 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 :: Type 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 :: Type 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 :: Type Source #

FromSQL LocalTime Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase LocalTime :: Type Source #

FromSQL TimeOfDay Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase TimeOfDay :: Type Source #

FromSQL Day Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.FromSQL

Associated Types

type PQBase Day :: Type 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 :: Type Source #

FromSQL XML Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.XML

Associated Types

type PQBase XML :: Type 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) :: Type 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) :: Type Source #

FromSQL (JSONB ByteString) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.JSON

Associated Types

type PQBase (JSONB ByteString) :: Type Source #

FromSQL (JSONB Value) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.JSON

Associated Types

type PQBase (JSONB Value) :: Type Source #

FromSQL (JSON ByteString) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.JSON

Associated Types

type PQBase (JSON ByteString) :: Type Source #

FromSQL (JSON ByteString) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.JSON

Associated Types

type PQBase (JSON ByteString) :: Type Source #

FromSQL (JSON Value) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.JSON

Associated Types

type PQBase (JSON Value) :: Type Source #

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

Defined in Database.PostgreSQL.PQTypes.Composite

Associated Types

type PQBase (Composite t) :: Type 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) :: Type Source #

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

Defined in Database.PostgreSQL.PQTypes.Array

Associated Types

type PQBase (Array2 t) :: Type 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) :: Type Source #

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

Defined in Database.PostgreSQL.PQTypes.Array

Associated Types

type PQBase (Array1 t) :: Type Source #

Methods

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