hpqtypes-1.5.2.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 # 

Associated Types

type PQBase Bool :: * Source #

FromSQL Char Source # 

Associated Types

type PQBase Char :: * Source #

FromSQL Double Source # 

Associated Types

type PQBase Double :: * Source #

FromSQL Float Source # 

Associated Types

type PQBase Float :: * Source #

FromSQL Int16 Source # 

Associated Types

type PQBase Int16 :: * Source #

FromSQL Int32 Source # 

Associated Types

type PQBase Int32 :: * Source #

FromSQL Int64 Source # 

Associated Types

type PQBase Int64 :: * Source #

FromSQL Word8 Source # 

Associated Types

type PQBase Word8 :: * Source #

FromSQL ByteString Source # 

Associated Types

type PQBase ByteString :: * Source #

FromSQL ByteString Source # 

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.

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.

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.

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

Associated Types

type PQBase Text :: * Source #

FromSQL LocalTime Source # 

Associated Types

type PQBase LocalTime :: * Source #

FromSQL TimeOfDay Source # 

Associated Types

type PQBase TimeOfDay :: * Source #

FromSQL Day Source # 

Associated Types

type PQBase Day :: * Source #

Methods

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

FromSQL Interval Source # 

Associated Types

type PQBase Interval :: * Source #

FromSQL XML Source # 

Associated Types

type PQBase XML :: * Source #

Methods

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

FromSQL t => FromSQL (Maybe t) Source # 

Associated Types

type PQBase (Maybe t) :: * Source #

Methods

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

FromSQL (JSONB ByteString) Source # 

Associated Types

type PQBase (JSONB ByteString) :: * Source #

FromSQL (JSONB ByteString) Source # 

Associated Types

type PQBase (JSONB ByteString) :: * Source #

FromSQL (JSONB Value) Source # 

Associated Types

type PQBase (JSONB Value) :: * Source #

FromSQL (JSON ByteString) Source # 

Associated Types

type PQBase (JSON ByteString) :: * Source #

FromSQL (JSON ByteString) Source # 

Associated Types

type PQBase (JSON ByteString) :: * Source #

FromSQL (JSON Value) Source # 

Associated Types

type PQBase (JSON Value) :: * Source #

CompositeFromSQL t => FromSQL (Composite t) Source # 

Associated Types

type PQBase (Composite t) :: * Source #

Methods

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

CompositeFromSQL t => FromSQL (CompositeArray2 t) Source # 

Associated Types

type PQBase (CompositeArray2 t) :: * Source #

FromSQL t => FromSQL (Array2 t) Source # 

Associated Types

type PQBase (Array2 t) :: * Source #

Methods

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

CompositeFromSQL t => FromSQL (CompositeArray1 t) Source # 

Associated Types

type PQBase (CompositeArray1 t) :: * Source #

FromSQL t => FromSQL (Array1 t) Source # 

Associated Types

type PQBase (Array1 t) :: * Source #

Methods

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