Drup / ocaml-lmdb

Ocaml bindings for lmdb.
https://drup.github.io/ocaml-lmdb/dev/
MIT License
48 stars 3 forks source link

more misc changes by madroach #22

Closed madroach closed 5 years ago

madroach commented 5 years ago

Based on #18.

Now with phantom types removed from Env.t and Map.t, less subtyping casts are required. Some are still needed when creating read-only cursors on read-write environments.

But what to do with Txn.go and its optional perm parameter? If we leave it as-is, the default-behaviour for ?perm:None will be a read-write transaction, even on read-only environments. Is this what we want? I would rather keep the parameter obligatory and unlabeled. Txn.go Ro and Txn.go Rw are concise statements.