salortiz / LMDB_File

Perl wrapper around the OpenLDAP's LMDB
Other
8 stars 12 forks source link

Use low-level cursor api? #22

Open akotlar opened 7 years ago

akotlar commented 7 years ago

There is no documentation for a way to use LMDB::Cursor directly (not via LMDB_File object, aka $DB->Cursor). It would be nice to have this feature exposed.

Would invoking LMDB::Cursor::new($txn,$dbi,my $cursor) be the way to do this? However, how would one call mdb_cursor_close, renew, etc ?

I suppose in general it would be nice to have the ability to access basic LMDB methods directly, because this would avoid the need to document all of the syntactic sugar (use LMDB C documentation).

akotlar commented 7 years ago

Confirmed that this does not work. Error after 1st use of cursor is "Not an active transaction".