lmdb++
Classes | Typedefs | Functions
lmdb Namespace Reference

<lmdb++.h> - C++11 wrapper for LMDB. More...

Classes

class  bad_dbi_error
 Exception class for MDB_BAD_DBI errors. More...
 
class  corrupted_error
 Exception class for MDB_CORRUPTED errors. More...
 
class  cursor
 Resource class for MDB_cursor* handles. More...
 
class  dbi
 Resource class for MDB_dbi handles. More...
 
class  env
 Resource class for MDB_env* handles. More...
 
class  error
 Base class for LMDB exception conditions. More...
 
class  fatal_error
 Base class for fatal error conditions. More...
 
class  key_exist_error
 Exception class for MDB_KEYEXIST errors. More...
 
class  logic_error
 Base class for logic error conditions. More...
 
class  map_full_error
 Exception class for MDB_MAP_FULL errors. More...
 
class  not_found_error
 Exception class for MDB_NOTFOUND errors. More...
 
class  panic_error
 Exception class for MDB_PANIC errors. More...
 
class  runtime_error
 Base class for runtime error conditions. More...
 
class  txn
 Resource class for MDB_txn* handles. More...
 
class  val
 Wrapper class for MDB_val structures. More...
 
class  version_mismatch_error
 Exception class for MDB_VERSION_MISMATCH errors. More...
 

Typedefs

using mode = mdb_mode_t
 

Functions

static void env_create (MDB_env **env)
 
static void env_open (MDB_env *env, const char *path, unsigned int flags, mode mode)
 
static void env_copy (MDB_env *env, const char *path, unsigned int flags)
 
static void env_copy_fd (MDB_env *env, mdb_filehandle_t fd, unsigned int flags)
 
static void env_stat (MDB_env *env, MDB_stat *stat)
 
static void env_info (MDB_env *env, MDB_envinfo *stat)
 
static void env_sync (MDB_env *env, bool force)
 
static void env_close (MDB_env *env) noexcept
 
static void env_set_flags (MDB_env *env, unsigned int flags, bool onoff)
 
static void env_get_flags (MDB_env *env, unsigned int *flags)
 
static void env_get_path (MDB_env *env, const char **path)
 
static void env_get_fd (MDB_env *env, mdb_filehandle_t *fd)
 
static void env_set_mapsize (MDB_env *env, std::size_t size)
 
static void env_set_max_readers (MDB_env *env, unsigned int count)
 
static void env_get_max_readers (MDB_env *env, unsigned int *count)
 
static void env_set_max_dbs (MDB_env *env, MDB_dbi count)
 
static unsigned int env_get_max_keysize (MDB_env *env)
 
static void env_set_userctx (MDB_env *env, void *ctx)
 
static void * env_get_userctx (MDB_env *env)
 
static void txn_begin (MDB_env *env, MDB_txn *parent, unsigned int flags, MDB_txn **txn)
 
static MDB_env * txn_env (MDB_txn *const txn) noexcept
 
static void txn_commit (MDB_txn *txn)
 
static void txn_abort (MDB_txn *txn) noexcept
 
static void txn_reset (MDB_txn *txn) noexcept
 
static void txn_renew (MDB_txn *txn)
 
static void dbi_open (MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *dbi)
 
static void dbi_stat (MDB_txn *txn, MDB_dbi dbi, MDB_stat *stat)
 
static void dbi_flags (MDB_txn *txn, MDB_dbi dbi, unsigned int *flags)
 
static void dbi_close (MDB_env *env, MDB_dbi dbi) noexcept
 
static void dbi_drop (MDB_txn *txn, MDB_dbi dbi, bool del)
 
static void dbi_set_compare (MDB_txn *txn, MDB_dbi dbi, MDB_cmp_func *cmp)
 
static void dbi_set_dupsort (MDB_txn *txn, MDB_dbi dbi, MDB_cmp_func *cmp)
 
static void dbi_set_relfunc (MDB_txn *txn, MDB_dbi dbi, MDB_rel_func *rel)
 
static void dbi_set_relctx (MDB_txn *txn, MDB_dbi dbi, void *ctx)
 
static bool dbi_get (MDB_txn *txn, MDB_dbi dbi, MDB_val *key, MDB_val *data)
 
static bool dbi_put (MDB_txn *txn, MDB_dbi dbi, MDB_val *key, MDB_val *data, unsigned int flags)
 
static bool dbi_del (MDB_txn *txn, MDB_dbi dbi, MDB_val *key, MDB_val *data)
 
static void cursor_open (MDB_txn *txn, MDB_dbi dbi, MDB_cursor **cursor)
 
static void cursor_close (MDB_cursor *cursor) noexcept
 
static void cursor_renew (MDB_txn *txn, MDB_cursor *cursor)
 
static MDB_txn * cursor_txn (MDB_cursor *cursor) noexcept
 
static MDB_dbi cursor_dbi (MDB_cursor *cursor) noexcept
 
static bool cursor_get (MDB_cursor *cursor, MDB_val *key, MDB_val *data, MDB_cursor_op op)
 
static void cursor_put (MDB_cursor *cursor, MDB_val *key, MDB_val *data, unsigned int flags)
 
static void cursor_del (MDB_cursor *cursor, unsigned int flags)
 
static void cursor_count (MDB_cursor *cursor, std::size_t &count)
 

Detailed Description

<lmdb++.h> - C++11 wrapper for LMDB.

Author
Arto Bendiken arto@.nosp@m.bend.nosp@m.iken..nosp@m.net
See also
https://sourceforge.net/projects/lmdbxx/

Typedef Documentation

using lmdb::mode = typedef mdb_mode_t

Function Documentation

static void lmdb::cursor_close ( MDB_cursor *  cursor)
inlinestaticnoexcept
static void lmdb::cursor_count ( MDB_cursor *  cursor,
std::size_t &  count 
)
inlinestatic
static MDB_dbi lmdb::cursor_dbi ( MDB_cursor *  cursor)
inlinestaticnoexcept
static void lmdb::cursor_del ( MDB_cursor *  cursor,
unsigned int  flags = 0 
)
inlinestatic
static bool lmdb::cursor_get ( MDB_cursor *  cursor,
MDB_val *  key,
MDB_val *  data,
MDB_cursor_op  op 
)
inlinestatic
static void lmdb::cursor_open ( MDB_txn *  txn,
MDB_dbi  dbi,
MDB_cursor **  cursor 
)
inlinestatic
static void lmdb::cursor_put ( MDB_cursor *  cursor,
MDB_val *  key,
MDB_val *  data,
unsigned int  flags = 0 
)
inlinestatic
static void lmdb::cursor_renew ( MDB_txn *  txn,
MDB_cursor *  cursor 
)
inlinestatic
static MDB_txn * lmdb::cursor_txn ( MDB_cursor *  cursor)
inlinestaticnoexcept
static void lmdb::dbi_close ( MDB_env *  env,
MDB_dbi  dbi 
)
inlinestaticnoexcept
static bool lmdb::dbi_del ( MDB_txn *  txn,
MDB_dbi  dbi,
MDB_val *  key,
MDB_val *  data = nullptr 
)
inlinestatic
Return values
trueif the key/value pair was removed
falseif the key wasn't found
See also
http://symas.com/mdb/doc/group__mdb.html#gab8182f9360ea69ac0afd4a4eaab1ddb0
static void lmdb::dbi_drop ( MDB_txn *  txn,
MDB_dbi  dbi,
bool  del = false 
)
inlinestatic
static void lmdb::dbi_flags ( MDB_txn *  txn,
MDB_dbi  dbi,
unsigned int *  flags 
)
inlinestatic
static bool lmdb::dbi_get ( MDB_txn *  txn,
MDB_dbi  dbi,
MDB_val *  key,
MDB_val *  data 
)
inlinestatic
Return values
trueif the key/value pair was retrieved
falseif the key wasn't found
See also
http://symas.com/mdb/doc/group__mdb.html#ga8bf10cd91d3f3a83a34d04ce6b07992d
static void lmdb::dbi_open ( MDB_txn *  txn,
const char *  name,
unsigned int  flags,
MDB_dbi *  dbi 
)
inlinestatic
static bool lmdb::dbi_put ( MDB_txn *  txn,
MDB_dbi  dbi,
MDB_val *  key,
MDB_val *  data,
unsigned int  flags = 0 
)
inlinestatic
Return values
trueif the key/value pair was inserted
falseif the key already existed
See also
http://symas.com/mdb/doc/group__mdb.html#ga4fa8573d9236d54687c61827ebf8cac0
static void lmdb::dbi_set_compare ( MDB_txn *  txn,
MDB_dbi  dbi,
MDB_cmp_func *  cmp = nullptr 
)
inlinestatic
static void lmdb::dbi_set_dupsort ( MDB_txn *  txn,
MDB_dbi  dbi,
MDB_cmp_func *  cmp = nullptr 
)
inlinestatic
static void lmdb::dbi_set_relctx ( MDB_txn *  txn,
MDB_dbi  dbi,
void *  ctx 
)
inlinestatic
static void lmdb::dbi_set_relfunc ( MDB_txn *  txn,
MDB_dbi  dbi,
MDB_rel_func *  rel 
)
inlinestatic
static void lmdb::dbi_stat ( MDB_txn *  txn,
MDB_dbi  dbi,
MDB_stat *  stat 
)
inlinestatic
static void lmdb::env_close ( MDB_env *  env)
inlinestaticnoexcept
static void lmdb::env_copy ( MDB_env *  env,
const char *  path,
unsigned int  flags = 0 
)
inlinestatic
static void lmdb::env_copy_fd ( MDB_env *  env,
mdb_filehandle_t  fd,
unsigned int  flags = 0 
)
inlinestatic
static void lmdb::env_create ( MDB_env **  env)
inlinestatic
static void lmdb::env_get_fd ( MDB_env *  env,
mdb_filehandle_t *  fd 
)
inlinestatic
static void lmdb::env_get_flags ( MDB_env *  env,
unsigned int *  flags 
)
inlinestatic
static unsigned int lmdb::env_get_max_keysize ( MDB_env *  env)
inlinestatic
static void lmdb::env_get_max_readers ( MDB_env *  env,
unsigned int *  count 
)
inlinestatic
static void lmdb::env_get_path ( MDB_env *  env,
const char **  path 
)
inlinestatic
static void * lmdb::env_get_userctx ( MDB_env *  env)
inlinestatic
static void lmdb::env_info ( MDB_env *  env,
MDB_envinfo *  stat 
)
inlinestatic
static void lmdb::env_open ( MDB_env *  env,
const char *  path,
unsigned int  flags,
mode  mode 
)
inlinestatic
static void lmdb::env_set_flags ( MDB_env *  env,
unsigned int  flags,
bool  onoff = true 
)
inlinestatic
static void lmdb::env_set_mapsize ( MDB_env *  env,
std::size_t  size 
)
inlinestatic
static void lmdb::env_set_max_dbs ( MDB_env *  env,
MDB_dbi  count 
)
inlinestatic
static void lmdb::env_set_max_readers ( MDB_env *  env,
unsigned int  count 
)
inlinestatic
static void lmdb::env_set_userctx ( MDB_env *  env,
void *  ctx 
)
inlinestatic
static void lmdb::env_stat ( MDB_env *  env,
MDB_stat *  stat 
)
inlinestatic
static void lmdb::env_sync ( MDB_env *  env,
bool  force = true 
)
inlinestatic
static void lmdb::txn_abort ( MDB_txn *  txn)
inlinestaticnoexcept
static void lmdb::txn_begin ( MDB_env *  env,
MDB_txn *  parent,
unsigned int  flags,
MDB_txn **  txn 
)
inlinestatic
static void lmdb::txn_commit ( MDB_txn *  txn)
inlinestatic
static MDB_env * lmdb::txn_env ( MDB_txn *const  txn)
inlinestaticnoexcept
static void lmdb::txn_renew ( MDB_txn *  txn)
inlinestatic
static void lmdb::txn_reset ( MDB_txn *  txn)
inlinestaticnoexcept