bmatsuo / lmdb-go

Bindings for the LMDB C library
BSD 3-Clause "New" or "Revised" License
158 stars 59 forks source link

lmdb: Unsupported features #1

Open bmatsuo opened 8 years ago

bmatsuo commented 8 years ago

Unsupported C functions:

* -- It's currently unclear what benefits this brings ** -- If this can be achieved it will not be trivial for users to instrument

Unusable flags:

bmatsuo commented 8 years ago

Passing a pointer to the mdb_set_userctx function violates the cgo tool restrictions mentioned in #10.

C code must not store any Go pointers into Go memory, even temporarily.

This makes use of the function very dubious. Storing a size_t integer value as user context does not seem very useful.

bmatsuo commented 8 years ago

I don't plan on implementing mdb_env_set_assert.

This hack should become obsolete as lmdb's error handling matures.

In my own experience its use has not been desired. And if it were to be supported there would be implementation issues. I'm just going to wait for further development.

bmatsuo commented 8 years ago

I have opened #12 to track the attempt at supporting mdb_set_compare and mdb_set_dupsort, at first in a primitive form to be expanded later when support is added to the C API.

bmatsuo commented 8 years ago

Re: mdb_set_relfunc/mdb_set_relctx

This feature is not implemented yet in LMDB

Currently the relocation feature is unimplemented and setting this function has no effect.

It looks like its technically possible to bind the API, though. The ctx function would likely have to be co-opted as is done for mdb_reader_list.

Though I don't have a good understanding of when this would be usable or if Go is usable in such environments. And the feature really shouldn't be implemented until there is some understanding of that.