hpqtypes-1.4.4: Haskell bindings to libpqtypes

Safe HaskellNone
LanguageHaskell98

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 
FromSQL Char Source 
FromSQL Double Source 
FromSQL Float Source 
FromSQL Int16 Source 
FromSQL Int32 Source 
FromSQL Int64 Source 
FromSQL Word8 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.

FromSQL ByteString Source 
FromSQL ByteString 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.

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.

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

FromSQL LocalTime Source 
FromSQL TimeOfDay Source 
FromSQL Day Source 
FromSQL Interval Source 
FromSQL XML Source 
FromSQL t => FromSQL (Maybe t) Source 
FromSQL (JSONB ByteString) Source 
FromSQL (JSONB ByteString) Source 
FromSQL (JSONB Value) Source 
FromSQL (JSON ByteString) Source 
FromSQL (JSON ByteString) Source 
FromSQL (JSON Value) Source 
CompositeFromSQL t => FromSQL (Composite t) Source 
FromSQL (Binary ByteString) Source 
CompositeFromSQL t => FromSQL (CompositeArray2 t) Source 
FromSQL t => FromSQL (Array2 t) Source 
CompositeFromSQL t => FromSQL (CompositeArray1 t) Source 
FromSQL t => FromSQL (Array1 t) Source