pub unsafe extern "C" fn mdb_env_set_maxdbs(
    env: *mut MDB_env,
    dbs: MDB_dbi
) -> c_int
Expand description

@brief Set the maximum number of named databases for the environment.

This function is only needed if multiple databases will be used in the environment. Simpler applications that use the environment as a single unnamed database can ignore this option. This function may only be called after #mdb_env_create() and before #mdb_env_open().

Currently a moderate number of slots are cheap but a huge number gets expensive: 7-120 words per transaction, and every #mdb_dbi_open() does a linear search of the opened slots. @param[in] env An environment handle returned by #mdb_env_create() @param[in] dbs The maximum number of databases @return A non-zero error value on failure and 0 on success. Some possible errors are:

  • EINVAL - an invalid parameter was specified, or the environment is already open.