Open
Description
I tried to simply delete an entry, and can't really know if I'm wrong or if this is a bug, the only documentation I could find was the api reference, if anyone has better material I'd be glad to take it.
#include <cstdio>
#include <cstdlib>
#include <lmdb++.h>
using namespace lmdb;
int main() {
auto env = lmdb::env::create();
env.set_mapsize(1UL * 1024UL * 1024UL);
env.open("./example.mdb", 0, 0664);
auto wtxn = lmdb::txn::begin(env);
auto dbi = lmdb::dbi::open(wtxn, nullptr);
dbi.put(wtxn, "key_entry", "value_entry");
wtxn.commit();
dbi.del(wtxn, "key_entry");
return EXIT_SUCCESS;
}
This yields the following error :
terminate called after throwing an instance of 'lmdb::runtime_error'
what(): mdb_del: Invalid argument
Metadata
Metadata
Assignees
Labels
No labels