[][src]Function lmdb_sys::mdb_dbi_close

pub unsafe extern "C" fn mdb_dbi_close(env: *mut MDB_env, dbi: MDB_dbi)

@brief 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.

@param[in] env An environment handle returned by #mdb_env_create() @param[in] dbi A database handle returned by #mdb_dbi_open()