Closed AlgorithmsAreCool closed 4 years ago
I'm open to the changes, but I understand that you may not be motivated to help considering I've neglected the project for some time. My circumstances have changed, but I'll leave this open regardless as a reminder.
Oh wow, I moved on from using this package a while back. But i still think it is by far the easiest to use of the .NET LMDB wrappers. Thank you for writing it!
I'm pretty busy for the next few days, but i'll try to submit a simple PR.
Upon looking into this request further. It looks like all code paths assert the return code and throw a LightningException that includes the status code.
Reading the lmdb docs i see that
mdb_del
returnsMDB_NOTFOUND
as an indicator that it could find a key to delete.Similarly
mdb_put
will returnMDB_KEYEXIST
if there is already a key in the database.These hints could be of use to clients and should be surfaced in the API.
If the maintainer thinks this is a good idea I could put a PR together to add this.