Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- type MDB_mode_t = Word16
- type MDB_dbi_t = Word32
- type MDB_cursor_op_t = Word32
- data MDB_env
- data MDB_txn
- data MDB_cursor
- data MDB_val = MDB_val {}
- c_mdb_strerror :: CInt -> IO CString
- c_mdb_env_create :: Ptr (Ptr MDB_env) -> IO CInt
- c_mdb_env_set_mapsize :: Ptr MDB_env -> CSize -> IO CInt
- c_mdb_env_set_maxreaders :: Ptr MDB_env -> CUInt -> IO CInt
- c_mdb_env_set_maxdbs :: Ptr MDB_env -> MDB_dbi_t -> IO CInt
- c_mdb_env_open :: Ptr MDB_env -> CString -> CUInt -> MDB_mode_t -> IO CInt
- c_mdb_txn_begin :: Ptr MDB_env -> Ptr MDB_txn -> CUInt -> Ptr (Ptr MDB_txn) -> IO CInt
- c_mdb_dbi_open :: Ptr MDB_txn -> CString -> CUInt -> Ptr MDB_dbi_t -> IO CInt
- c_mdb_txn_commit :: Ptr MDB_txn -> IO CInt
- c_mdb_txn_abort :: Ptr MDB_txn -> IO ()
- c_mdb_cursor_open :: Ptr MDB_txn -> MDB_dbi_t -> Ptr (Ptr MDB_cursor) -> IO CInt
- c_mdb_cursor_get :: Ptr MDB_cursor -> Ptr MDB_val -> Ptr MDB_val -> MDB_cursor_op_t -> IO CInt
- c_mdb_cursor_close :: Ptr MDB_cursor -> IO ()
- c_mdb_get :: Ptr MDB_txn -> MDB_dbi_t -> Ptr MDB_val -> Ptr MDB_val -> IO CInt
- c_mdb_put :: Ptr MDB_txn -> MDB_dbi_t -> Ptr MDB_val -> Ptr MDB_val -> CUInt -> IO CInt
- c_mdb_put_ :: Ptr MDB_txn -> MDB_dbi_t -> Ptr CChar -> CSize -> Ptr CChar -> CSize -> CUInt -> IO CInt
- c_mdb_drop :: Ptr MDB_txn -> MDB_dbi_t -> CInt -> IO CInt
- data LMDB_Error = LMDB_Error {}
- data MDB_ErrCode
- = MDB_KEYEXIST
- | MDB_NOTFOUND
- | MDB_PAGE_NOTFOUND
- | MDB_CORRUPTED
- | MDB_PANIC
- | MDB_VERSION_MISMATCH
- | MDB_INVALID
- | MDB_MAP_FULL
- | MDB_DBS_FULL
- | MDB_READERS_FULL
- | MDB_TLS_FULL
- | MDB_TXN_FULL
- | MDB_CURSOR_FULL
- | MDB_PAGE_FULL
- | MDB_MAP_RESIZED
- | MDB_INCOMPATIBLE
- | MDB_BAD_RSLOT
- | MDB_BAD_TXN
- | MDB_BAD_VALSIZE
- | MDB_BAD_DBI
- errCodes :: [(MDB_ErrCode, Int)]
- numToErrVal :: Int -> Either Int MDB_ErrCode
- throwLMDBErrNum :: String -> CInt -> IO noReturn
- mdb_notfound :: CInt
- mdb_rdonly :: CUInt
- mdb_notls :: CUInt
- mdb_nosubdir :: CUInt
- mdb_nooverwrite :: CUInt
- mdb_append :: CUInt
- mdb_create :: CUInt
- combineOptions :: [CUInt] -> CUInt
- mdb_first :: MDB_cursor_op_t
- mdb_next :: MDB_cursor_op_t
- mdb_env_create :: IO (Ptr MDB_env)
- mdb_env_set_mapsize :: Ptr MDB_env -> Int -> IO ()
- mdb_env_set_maxdbs :: Ptr MDB_env -> Int -> IO ()
- mdb_env_set_maxreaders :: Ptr MDB_env -> Int -> IO ()
- mdb_env_open :: Ptr MDB_env -> FilePath -> CUInt -> IO ()
- mdb_txn_begin :: Ptr MDB_env -> Ptr MDB_txn -> CUInt -> IO (Ptr MDB_txn)
- mdb_txn_commit :: Ptr MDB_txn -> IO ()
- mdb_cursor_open :: Ptr MDB_txn -> MDB_dbi_t -> IO (Ptr MDB_cursor)
- mdb_dbi_open :: Ptr MDB_txn -> Maybe String -> CUInt -> IO MDB_dbi_t
- mdb_put :: Ptr MDB_txn -> MDB_dbi_t -> Ptr MDB_val -> Ptr MDB_val -> CUInt -> IO ()
- mdb_put_ :: Ptr MDB_txn -> MDB_dbi_t -> Ptr CChar -> CSize -> Ptr CChar -> CSize -> CUInt -> IO ()
- mdb_clear :: Ptr MDB_txn -> MDB_dbi_t -> IO ()
- withCStringMaybe :: Maybe String -> (CString -> IO a) -> IO a
Documentation
type MDB_mode_t = Word16 Source #
type MDB_cursor_op_t = Word32 Source #
data MDB_cursor Source #
Instances
Storable MDB_val Source # | |
c_mdb_env_open :: Ptr MDB_env -> CString -> CUInt -> MDB_mode_t -> IO CInt Source #
c_mdb_cursor_get :: Ptr MDB_cursor -> Ptr MDB_val -> Ptr MDB_val -> MDB_cursor_op_t -> IO CInt Source #
c_mdb_cursor_close :: Ptr MDB_cursor -> IO () Source #
c_mdb_put_ :: Ptr MDB_txn -> MDB_dbi_t -> Ptr CChar -> CSize -> Ptr CChar -> CSize -> CUInt -> IO CInt Source #
data LMDB_Error Source #
Instances
Show LMDB_Error Source # | |
Defined in Streamly.External.LMDB.Internal.Foreign showsPrec :: Int -> LMDB_Error -> ShowS # show :: LMDB_Error -> String # showList :: [LMDB_Error] -> ShowS # | |
Exception LMDB_Error Source # | |
Defined in Streamly.External.LMDB.Internal.Foreign toException :: LMDB_Error -> SomeException # fromException :: SomeException -> Maybe LMDB_Error # displayException :: LMDB_Error -> String # |
data MDB_ErrCode Source #
Instances
Eq MDB_ErrCode Source # | |
Defined in Streamly.External.LMDB.Internal.Foreign (==) :: MDB_ErrCode -> MDB_ErrCode -> Bool # (/=) :: MDB_ErrCode -> MDB_ErrCode -> Bool # | |
Show MDB_ErrCode Source # | |
Defined in Streamly.External.LMDB.Internal.Foreign showsPrec :: Int -> MDB_ErrCode -> ShowS # show :: MDB_ErrCode -> String # showList :: [MDB_ErrCode] -> ShowS # |
errCodes :: [(MDB_ErrCode, Int)] Source #
numToErrVal :: Int -> Either Int MDB_ErrCode Source #
mdb_notfound :: CInt Source #
mdb_rdonly :: CUInt Source #
mdb_nosubdir :: CUInt Source #
mdb_append :: CUInt Source #
mdb_create :: CUInt Source #
combineOptions :: [CUInt] -> CUInt Source #
mdb_cursor_open :: Ptr MDB_txn -> MDB_dbi_t -> IO (Ptr MDB_cursor) Source #