-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | An efficient native PostgreSQL driver -- -- A highly efficient PostgreSQL driver and a flexible mapping API. -- -- This is an experimental version, which implements the binary protocol -- natively. -- -- This package is the root of the "hasql" ecosystem. -- -- The API is completely disinfected from exceptions. All error-reporting -- is explicit and is presented using the Either type. @package hasql @version 0.20 module Hasql.EncodePrimitive data EncodePrimitive primitive int2 :: EncodePrimitive Int16 int4 :: EncodePrimitive Int32 int8 :: EncodePrimitive Int64 text :: EncodePrimitive Text date :: EncodePrimitive Day time :: EncodePrimitive TimeOfDay timetz :: EncodePrimitive (TimeOfDay, TimeZone) timestamp :: EncodePrimitive LocalTime timestamptz :: EncodePrimitive UTCTime interval :: EncodePrimitive DiffTime module Hasql.EncodeParams data EncodeParams input param :: EncodeParam param -> EncodeParams param nullableParam :: EncodeParam param -> EncodeParams (Maybe param) module Hasql.EncodeParam data EncodeParam param primitive :: EncodePrimitive primitive -> EncodeParam primitive arrayVector :: EncodePrimitive primitive -> EncodeParam (Vector primitive) arrayVectorWithNulls :: EncodePrimitive primitive -> EncodeParam (Vector (Maybe primitive)) module Hasql.Statement data Statement params result prepared :: ByteString -> EncodeParams params -> DecodeResult result -> Statement params result unprepared :: ByteString -> EncodeParams params -> DecodeResult result -> Statement params result module Hasql.DecodeResult data DecodeResult result -- | Ignore the result. ignore :: DecodeResult () -- | The amount of rows affected by the statement. All statements produce -- this result. length :: DecodeResult Int -- | First row of a non-empty result. Raises a connection error if there's -- no rows. head :: DecodeRow row -> DecodeResult row -- | First row of a possibly empty result set. headIfExists :: DecodeRow row -> DecodeResult (Maybe row) -- | Vector of rows. vector :: DecodeRow row -> DecodeResult (Vector row) -- | List of rows. Slower than revList. list :: DecodeRow row -> DecodeResult [row] -- | List of rows in a reverse order. Faster than list. revList :: DecodeRow row -> DecodeResult [row] -- | Rows folded into a map. hashMap :: (Eq key, Hashable key) => DecodeRow (key, value) -> DecodeResult (HashMap key value) -- | Essentially, a specification of Map/Reduce over all the rows of the -- result set. Can be used to produce all kinds of containers or to -- implement aggregation algorithms on the client side. -- -- Besides the result of folding it returns the amount of affected rows, -- since it's provided by the database either way. foldRows :: Fold row result -> DecodeRow row -> DecodeResult (result, Int) -- | Essentially, a specification of Map/Reduce over all the rows of the -- result set. Can be used to produce all kinds of containers or to -- implement aggregation algorithms on the client side. -- -- Besides the result of folding it returns the amount of affected rows, -- since it's provided by the database either way. foldMRows :: FoldM IO row result -> DecodeRow row -> DecodeResult (result, Int) module Hasql.DecodeRow data DecodeRow row primitive :: DecodePrimitive column -> DecodeRow column nullablePrimitive :: DecodePrimitive column -> DecodeRow (Maybe column) module Hasql.DecodePrimitive data DecodePrimitive primitive bool :: DecodePrimitive Bool int8 :: DecodePrimitive Int64 text :: DecodePrimitive Text bytea :: DecodePrimitive ByteString timestamptz :: DecodePrimitive UTCTime module Hasql.Session data Session result batch :: Batch result -> Session result module Hasql.Connection data Connection data ConnectionSettings TCPConnectionSettings :: !ByteString -> !Int -> ConnectionSettings SocketConnectionSettings :: !ByteString -> ConnectionSettings data Error -- | An erroneous result received from the DB. The components are: -- --