Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type family MkConstraint (m :: * -> *) (cs :: [(* -> *) -> Constraint]) :: Constraint where ...
- mread :: Read a => String -> Maybe a
- safePeekCString :: CString -> IO (Maybe String)
- safePeekCString' :: CString -> IO String
- cStringLenToBytea :: CStringLen -> PGbytea
- byteaToCStringLen :: PGbytea -> CStringLen
- textToCString :: Text -> IO (ForeignPtr CChar)
- verifyPQTRes :: Ptr PGerror -> String -> CInt -> IO ()
- withPGparam :: Ptr PGconn -> (Ptr PGparam -> IO r) -> IO r
- 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
type family MkConstraint (m :: * -> *) (cs :: [(* -> *) -> Constraint]) :: Constraint where ... Source #
MkConstraint m '[] = () | |
MkConstraint m (c ': cs) = (c m, MkConstraint m cs) |
cStringLenToBytea :: CStringLen -> PGbytea Source #
Convert C string to PGbytea
.
byteaToCStringLen :: PGbytea -> CStringLen Source #
Convert PGbytea
to C string.
textToCString :: Text -> IO (ForeignPtr CChar) Source #
Convert Text
to UTF-8 encoded 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.