FYI. I have written a Crystal language wrapper for LMDB. It's here https://github.com/timuckun/crystal-liblmdb
Hope it's of some use to somebody.
On Mon, Dec 5, 2016 at 8:24 PM, Ulrich Windl < Ulrich.Windl@rz.uni-regensburg.de> wrote:
Hi!
I think you are free to implement your data dictionary any complex data structures using LMDB ;-)
Ulrich
Tim Uckun timuckun@gmail.com schrieb am 02.12.2016 um 12:26 in
Nachricht CAGuHJrM2wZt1jZHCqECODvFc699VgRqSMyZr1NJR0xUuxcskjw@mail.gmail.com:
I am writing a wrapper for liblmdb and one thing I was able to do was to store simple integers and floats as the value into the database. This seems to work pretty well but I am wondering if this is somehow against best practice.
One bad thing about this is that when you are doing a seek or a cursor operation the code does not know what kind of data is at the record. I
have
some routines to cast them back from the pointers but the user has to
know
what to cast them to. It would be very handy if the MDB_val struct had a field for metadata, even if it just a byte.
Anyway I am wondering how much trouble I am getting myself with this practice.
Thanks.