postgresql-binary-0.9.3: Encoders and decoders for the PostgreSQL's binary format

Safe HaskellNone
LanguageHaskell2010

PostgreSQL.Binary.Data

Description

Models of supported data structures according to the serialisation format.

Synopsis

Documentation

type Array = (Vector ArrayDimension, Vector Content, Bool, OID) #

A representation of a data serializable to the PostgreSQL array binary format.

Consists of a vector of dimensions, a vector of encoded elements, a flag specifying, whether it contains any nulls, and an oid.

type ArrayDimension = (Word32, Word32) #

A width and a lower bound.

Currently the lower bound is only allowed to have a value of 1.

type Content = Maybe ByteString #

An encoded value. Nothing if it represents a NULL.

type OID = Word32 #

A Postgres OID of a type.

type Composite = Vector (OID, Content) #

A representation of a composite Postgres data (Record or Row).

type HStore = Vector (ByteString, Content) #

HStore.

type UUID = (Word32, Word32, Word32, Word32) #

The four components of UUID.

type Numeric = (Int16, Word16, Vector Int16) #

Representation of the PostgreSQL Numeric encoding.

Consists of the following components:

  • Point index
  • Sign code
  • Components

data Inet #

Representation of the PostgreSQL Network Address Type inet.

The Inet type holds an IPv4 or IPv6 host address, and optionally its subnet. The subnet is represented by the number of network address bits present in the host address (the "netmask"). If the subnet portion is missing, the netmask is 32 for IPv4 and 128 for IPv6.

Instances

Eq Inet # 

Methods

(==) :: Inet -> Inet -> Bool #

(/=) :: Inet -> Inet -> Bool #

Show Inet # 

Methods

showsPrec :: Int -> Inet -> ShowS #

show :: Inet -> String #

showList :: [Inet] -> ShowS #

type IPv4 = (Word8, Word8, Word8, Word8) #

type Netmask = Word8 #

afInet :: Word8 #

Address family AF_INET

afInet6 :: Word8 #

Address family AF_INET6