-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get an specific value with lmdb++ #1
Comments
The convenience template methods for Here follows an example of the "low-level" way to perform key/value lookups; everything else is just a convenience method on top of this fundamental
I will do some work to improve and better document the various convenience methods for this, but in the meantime the above method will definitely work. I'll update this ticket when there is a better (i.e., more convenient) example available. |
hi bendiken, its exciting to found this repo as i need to use lmdb in my work recently. but it seems like the codes are not well supported to std::string.
the output data size is correct, but the data is not. It looks like this,
that some unknown character show up in the data end. I suppose there is some bug on conversion of char array and string? any idea about this? |
I have removed the convenience template functions in my fork of this project. Instead you use std::string_view, which should solve the issues in this thread. Here are some more details on my fork's approach: https://github.com/hoytech/lmdbxx#string_view |
See drycpp/lmdbxx#1 (comment) for more info
I have already tried to use lmdb++ but I failed.
What I want to do is simple, it is like the example.cc but I want to get an specific value of a key of the data base instead of go over all the values that have been saved on it with cursors.
For example:
But it returns me:
Segmentation fault (core dumped)
How can I do this?
The text was updated successfully, but these errors were encountered: