Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Encoding = Builder
- encodingBytes :: Encoding -> ByteString
- array :: Word32 -> Array -> Encoding
- array_foldable :: Foldable foldable => Word32 -> (element -> Maybe Encoding) -> foldable element -> Encoding
- array_vector :: Word32 -> (element -> Encoding) -> Vector element -> Encoding
- nullableArray_vector :: Word32 -> (element -> Encoding) -> Vector (Maybe element) -> Encoding
- hStore_foldable :: Foldable foldable => foldable (Text, Maybe Text) -> Encoding
- hStore_hashMap :: HashMap Text (Maybe Text) -> Encoding
- hStore_map :: Map Text (Maybe Text) -> Encoding
- bool :: Bool -> Encoding
- int2_int16 :: Int16 -> Encoding
- int2_word16 :: Word16 -> Encoding
- int4_int32 :: Int32 -> Encoding
- int4_word32 :: Word32 -> Encoding
- int8_int64 :: Int64 -> Encoding
- int8_word64 :: Word64 -> Encoding
- float4 :: Float -> Encoding
- float8 :: Double -> Encoding
- numeric :: Scientific -> Encoding
- uuid :: UUID -> Encoding
- inet :: NetAddr IP -> Encoding
- char_utf8 :: Char -> Encoding
- text_strict :: Text -> Encoding
- text_lazy :: Text -> Encoding
- bytea_strict :: ByteString -> Encoding
- bytea_lazy :: ByteString -> Encoding
- date :: Day -> Encoding
- time_int :: TimeOfDay -> Encoding
- time_float :: TimeOfDay -> Encoding
- timetz_int :: (TimeOfDay, TimeZone) -> Encoding
- timetz_float :: (TimeOfDay, TimeZone) -> Encoding
- timestamp_int :: LocalTime -> Encoding
- timestamp_float :: LocalTime -> Encoding
- timestamptz_int :: UTCTime -> Encoding
- timestamptz_float :: UTCTime -> Encoding
- interval_int :: DiffTime -> Encoding
- interval_float :: DiffTime -> Encoding
- json_bytes :: ByteString -> Encoding
- json_ast :: Value -> Encoding
- jsonb_bytes :: ByteString -> Encoding
- jsonb_ast :: Value -> Encoding
- data Array
- encodingArray :: Encoding -> Array
- nullArray :: Array
- dimensionArray :: (forall b. (b -> a -> b) -> b -> c -> b) -> (a -> Array) -> c -> Array
Encoding
encodingBytes :: Encoding -> ByteString Source #
array :: Word32 -> Array -> Encoding Source #
Turn an array builder into final value. The first parameter is OID of the element type.
array_foldable :: Foldable foldable => Word32 -> (element -> Maybe Encoding) -> foldable element -> Encoding Source #
A helper for encoding of arrays of single dimension from foldables. The first parameter is OID of the element type.
array_vector :: Word32 -> (element -> Encoding) -> Vector element -> Encoding Source #
A helper for encoding of arrays of single dimension from vectors. The first parameter is OID of the element type.
nullableArray_vector :: Word32 -> (element -> Encoding) -> Vector (Maybe element) -> Encoding Source #
A helper for encoding of arrays of single dimension from vectors. The first parameter is OID of the element type.
hStore_foldable :: Foldable foldable => foldable (Text, Maybe Text) -> Encoding Source #
A polymorphic HSTORE
encoder.
Primitives
int2_int16 :: Int16 -> Encoding Source #
int2_word16 :: Word16 -> Encoding Source #
int4_int32 :: Int32 -> Encoding Source #
int4_word32 :: Word32 -> Encoding Source #
int8_int64 :: Int64 -> Encoding Source #
int8_word64 :: Word64 -> Encoding Source #
numeric :: Scientific -> Encoding Source #
text_strict :: Text -> Encoding Source #
bytea_strict :: ByteString -> Encoding Source #
bytea_lazy :: ByteString -> Encoding Source #
Time
Some of the functions in this section are distinguished based
on the integer_datetimes
setting of the server.
time_float :: TimeOfDay -> Encoding Source #
timestamp_int :: LocalTime -> Encoding Source #
timestamp_float :: LocalTime -> Encoding Source #
timestamptz_int :: UTCTime -> Encoding Source #
timestamptz_float :: UTCTime -> Encoding Source #
interval_int :: DiffTime -> Encoding Source #
interval_float :: DiffTime -> Encoding Source #
JSON
json_bytes :: ByteString -> Encoding Source #
jsonb_bytes :: ByteString -> Encoding Source #
Array
encodingArray :: Encoding -> Array Source #
dimensionArray :: (forall b. (b -> a -> b) -> b -> c -> b) -> (a -> Array) -> c -> Array Source #