2020-02-09 23:58:17 +00:00
|
|
|
#ifndef CONTROLLER_DATABASE_H
|
|
|
|
#define CONTROLLER_DATABASE_H
|
|
|
|
|
|
|
|
#include <lmdb.h>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Setup lmdb database enviroment
|
|
|
|
*
|
|
|
|
* Creates, sets max dbs and opens an MDB_env instance.
|
|
|
|
* Will return on success, but exit program on failure.
|
|
|
|
*
|
|
|
|
* @param mdb_env Source variable will be set to new MDB_env
|
|
|
|
*/
|
|
|
|
void
|
2020-04-18 14:34:43 +00:00
|
|
|
database_setup(MDB_env **mdb_env, config_t *config);
|
2020-02-09 23:58:17 +00:00
|
|
|
|
2020-06-24 09:41:12 +00:00
|
|
|
extern MDB_env *global_mdb_env;
|
|
|
|
|
2020-02-09 23:58:17 +00:00
|
|
|
#endif /* CONTROLLER_DATABASE_H */
|