pub unsafe extern "C" fn mdb_dbi_close(
env: *mut MDB_env,
dbi: MDB_dbi,
)
Expand description
Close a database handle. Normally unnecessary. Use with care:
This call is not mutex protected. Handles should only be closed by a single thread, and only if no other threads are going to reference the database handle or one of its cursors any further. Do not close a handle if an existing transaction has modified its database. Doing so can cause misbehavior from database corruption to errors like MDB_BAD_VALSIZE (since the DB name is gone).
Closing a database handle is not necessary, but lets #mdb_dbi_open() reuse the handle value. Usually it’s better to set a bigger #mdb_env_set_maxdbs(), unless that value would be large.
§Arguments
env
(direction in) - An environment handle returned by #mdb_env_create()dbi
(direction in) - A database handle returned by #mdb_dbi_open()