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

Safe HaskellNone
LanguageHaskell2010

PostgreSQLBinary.Encoder

Contents

Synopsis

Documentation

type E a = a -> ByteString Source

A function for rendering a value into a byte string.

Numbers

Text

char :: E Char Source

A UTF-8-encoded char.

Note that since it's UTF-8-encoded not a "char" but a "text" OID should be used with it.

text :: E (Either Text Text) Source

Either a strict or a lazy text.

bytea :: E (Either ByteString ByteString) Source

Either a strict or a lazy bytestring.

Date and Time

time :: Bool -> E TimeOfDay Source

Encoding strategy depends on whether the server supports integer_datetimes.

timetz :: Bool -> E (TimeOfDay, TimeZone) Source

Encoding strategy depends on whether the server supports integer_datetimes.

Misc