Skip to content
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

Cannot assign LMDB::Txn->new() to $DB->Txn #23

Open
akotlar opened this issue Dec 22, 2016 · 0 comments
Open

Cannot assign LMDB::Txn->new() to $DB->Txn #23

akotlar opened this issue Dec 22, 2016 · 0 comments

Comments

@akotlar
Copy link
Contributor

akotlar commented Dec 22, 2016

Documentation states $DB->Txn can be used as lvalue. This works when assigning $Env->BeginTxn() but not when assigning LMDB::Txn->new(). $DB->Txn is undef in the latter case.

I think this is part of the larger general issue of documentation (#22). We have low-level methods, but there are few examples (and few tests) for their use. The low-level API is also incomplete, with no direct access to Cursor (./t/04-bigone.t shows how to use the underlying _get method, which is undocumented, but no ability to use Cursor outside of LMDB_File objects).

I think it would be more idiomatic to have access to mdb_* methods. They are already present in the XS package. Is there any way to use them directly? If not, would it be hard to expose them?

@akotlar akotlar changed the title Cannot use LMDB::Txn->new to renew $DB->Txn Cannot assign LMDB::Txn->new() to $DB->Txn Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant