leveldb-haskell-0.6.5: Haskell bindings to LevelDB

Copyright(c) 2012-2014 The leveldb-haskell Authors
LicenseBSD3
Maintainerkim.altintop@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Database.LevelDB.C

Description

 

Synopsis

Documentation

c_leveldb_get Source #

Arguments

:: LevelDBPtr 
-> ReadOptionsPtr 
-> Key 
-> CSize 
-> Ptr CSize

value length

-> ErrPtr 
-> IO CString 

Returns NULL if not found. A malloc()ed array otherwise. Stores the length of the array in *vallen.

c_leveldb_property_value :: LevelDBPtr -> CString -> IO CString Source #

Returns NULL if property name is unknown. Else returns a pointer to a malloc()-ed null-terminated value.

c_leveldb_approximate_sizes Source #

Arguments

:: LevelDBPtr 
-> CInt

num ranges

-> Ptr CString 
-> Ptr CSize

range start keys (array)

-> Ptr CString 
-> Ptr CSize

range limit keys (array)

-> Ptr Word64

array of approx. sizes of ranges

-> IO () 

c_leveldb_compact_range Source #

Arguments

:: LevelDBPtr 
-> CString 
-> CSize

start key

-> CString 
-> CSize

limit key

-> IO () 

c_leveldb_writebatch_iterate Source #

Arguments

:: WriteBatchPtr 
-> Ptr ()

state

-> FunPtr (Ptr () -> Key -> CSize -> Val -> CSize)

put

-> FunPtr (Ptr () -> Key -> CSize)

delete

-> IO () 

type StatePtr = Ptr () Source #

mkCmp :: CompareFun -> IO (FunPtr CompareFun) Source #

Make a FunPtr to a user-defined comparator function

mkDest :: Destructor -> IO (FunPtr Destructor) Source #

Make a destructor FunPtr

mkName :: NameFun -> IO (FunPtr NameFun) Source #

Make a name FunPtr

type CreateFilterFun Source #

Arguments

 = StatePtr 
-> Ptr CString

key array

-> Ptr CSize

key length array

-> CInt

num keys

-> Ptr CSize

filter length

-> IO CString

the filter

type KeyMayMatchFun Source #

Arguments

 = StatePtr 
-> CString

key

-> CSize

key length

-> CString

filter

-> CSize

filter length

-> IO CUChar

whether key is in filter

mkCF :: CreateFilterFun -> IO (FunPtr CreateFilterFun) Source #

Make a FunPtr to a user-defined create_filter function

mkKMM :: KeyMayMatchFun -> IO (FunPtr KeyMayMatchFun) Source #

Make a FunPtr to a user-defined key_may_match function