Safe Haskell | None |
---|---|
Language | Haskell98 |
- mread :: Read a => String -> Maybe a
- safePeekCString :: CString -> IO (Maybe String)
- safePeekCString' :: CString -> IO String
- cStringLenToBytea :: CStringLen -> PGbytea
- byteaToCStringLen :: PGbytea -> CStringLen
- bsToCString :: ByteString -> IO (ForeignPtr CChar)
- verifyPQTRes :: Ptr PGerror -> String -> CInt -> IO ()
- withPGparam :: Ptr PGconn -> (Ptr PGparam -> IO r) -> IO r
- throwQueryError :: Ptr PGconn -> Ptr PGresult -> IO a
- throwLibPQError :: Ptr PGconn -> String -> IO a
- throwLibPQTypesError :: Ptr PGerror -> String -> IO a
- rethrowWithArrayError :: CInt -> SomeException -> IO a
- hpqTypesError :: String -> IO a
- unexpectedNULL :: IO a
Documentation
safePeekCString' :: CString -> IO String Source
Safely peek C string and return "" if NULL.
cStringLenToBytea :: CStringLen -> PGbytea Source
Convert C string to PGbytea
.
byteaToCStringLen :: PGbytea -> CStringLen Source
Convert PGbytea
to C string.
bsToCString :: ByteString -> IO (ForeignPtr CChar) Source
Convert ByteString
to C string wrapped by foreign pointer.
verifyPQTRes :: Ptr PGerror -> String -> CInt -> IO () Source
Check return value of a function from libpqtypes and if it indicates an error, throw appropriate exception.
rethrowWithArrayError :: CInt -> SomeException -> IO a Source
Rethrow supplied exception enriched with array index.
hpqTypesError :: String -> IO a Source
Throw 'HPQTypesError exception.
unexpectedNULL :: IO a Source
Throw 'unexpected NULL' exception.