lmdbxx
lmdbxx copied to clipboard
Calling put(MDB_txn, std::string, std::string) is not doing what is expected.
Describe the bug put(MDB_txn, std::string, std::string) is storing the binary representation of the std::string objects, when a C++ user would expect it to be the C++ friendly version of put(MDB_txn, const char*, const char*). This is made worse by the existence of lmdb::cursor::get(std::string& key, std::string& value) which is indeed C++ friendly.
To reproduce std::string key = "mykey"; std::string value = "myvalue"; dbi.put(wtxn, key, value);
Expected behavior It should insert the strings contained in the std::string objects.