hoytech / lmdbxx

C++17 wrapper for the LMDB embedded B+ tree database library
The Unlicense
51 stars 16 forks source link

lmdb::dbi::open should take a string_view #5

Closed deepbluev7 closed 3 years ago

deepbluev7 commented 3 years ago

If you store the names of sub dbs in a db, you need to first convert them to a std::string and then call c_str() on it, to be able to pass it safely to dbi::open. Imo it should be possible to pass the string_view directly.

This is a small UX fix, otherwise I really enjoy using this library, thank you for maintaining it!

hoytech commented 3 years ago

Good idea, thank you for requesting it! I just pushed a commit that I think should do what you want. Let me know if not :+1:

deepbluev7 commented 3 years ago

Wow, awesome, thank you! That was super quick!