hpqtypes-1.11.1.1: Haskell bindings to libpqtypes
Safe HaskellSafe-Inferred
LanguageHaskell2010

Database.PostgreSQL.PQTypes.Internal.C.Interface

Description

Exports a set of FFI-imported libpq/libpqtypes functions.

Synopsis

libpq imports

c_PQsetClientEncoding :: Ptr PGconn -> CString -> IO CInt Source #

Safe as it sends a query to the server.

c_PQconsumeInput :: Ptr PGconn -> IO CInt Source #

Safe as it reads data from a socket.

c_PQclear :: Ptr PGresult -> IO () Source #

Safe as it performs multiple actions when clearing the result.

c_PQcancel :: Ptr PGconn -> IO (Maybe String) Source #

Attempt to cancel currently running query. If the request is successfully dispatched Nothing is returned, otherwise a textual explanation of what happened.

c_PQconnectStart :: CString -> IO (Ptr PGconn) Source #

Safe as it might make a DNS lookup.

c_PQconnectPoll :: Ptr PGconn -> IO PostgresPollingStatusType Source #

Safe as it reads data from a socket.

c_PQfinish :: Ptr PGconn -> IO () Source #

Safe as it sends a terminate command to the server.

libpqtypes imports

c_PQinitTypes :: Ptr PGconn -> IO () Source #

Safe as it calls PQregisterEventProc with a nontrivial callback.

c_PQregisterTypes :: Ptr PGconn -> Ptr PGerror -> TypeClass -> Ptr PGregisterType -> CInt -> CInt -> IO CInt Source #

Safe as it sends a query to the server.

c_PQparamExec :: Ptr PGconn -> Ptr PGerror -> Ptr PGparam -> CString -> ResultFormat -> IO (ForeignPtr PGresult) Source #

Safe wrapper for c_rawPQparamExec. Wraps result returned by c_rawPQparamExec in ForeignPtr with asynchronous exceptions masked to prevent memory leaks.

c_PQparamPrepare :: Ptr PGconn -> Ptr PGerror -> Ptr PGparam -> CString -> CString -> IO (ForeignPtr PGresult) Source #

Safe wrapper for c_rawPQprepare. Wraps result returned by c_rawPQprepare in ForeignPtr with asynchronous exceptions masked to prevent memory leaks.

c_PQparamExecPrepared :: Ptr PGconn -> Ptr PGerror -> Ptr PGparam -> CString -> ResultFormat -> IO (ForeignPtr PGresult) Source #

Safe wrapper for c_rawPQparamExecPrepared. Wraps result returned by c_rawPQparamExecPrepared in ForeignPtr with asynchronous exceptions masked to prevent memory leaks.

misc imports