deephacks / lmdbjni

LMDB for Java
Apache License 2.0
204 stars 28 forks source link

Missing methods in BufferCursor #55

Closed bfreuden closed 8 years ago

bfreuden commented 8 years ago

Hi,

BufferCursor lacks get/write methods compared to DirectBuffer:

It is also difficult to keep track of the length of the key and value being written since keyWriteIndex and valWriteIndex are not (read) accessible. They could be accessible through those methods:

I must admit I hesitated between the cursorKeyLength() and bufferedKeyLength() method naming. If you are interested I will propose a pull request with unit tests. There might some other methods missing, but this will be small next step.

krisskross commented 8 years ago

Good addition. See the PR for comments.

krisskross commented 8 years ago

PR merged. Closing.