Module mdbx

Source
Available on crate feature mdbx only.
Expand description

Helper functions for initializing and opening a database.

Modules§

cursor
Cursor wrapper for libmdbx-sys.
ffi
libmdbx bindings.
tx
Transaction wrapper for libmdbx-sys.

Macros§

mdbx_try_optional

Structs§

CommitLatency
Commit latencies info.
Cursor
A cursor for navigating the items within a database.
Database
A handle to an individual database in an environment.
DatabaseArguments
Arguments for database initialization.
DatabaseEnv
Wrapper for the libmdbx environment: Environment
DatabaseFlags
Database options.
Environment
An environment supports multiple databases, all residing in the same shared-memory map.
EnvironmentBuilder
Options for opening or creating an environment.
EnvironmentFlags
Geometry
Represents the geometry settings for the database environment
Info
Environment information.
ObjectLength
If you don’t need the data itself, just its length.
RO
RW
Stat
Environment statistics.
Transaction
An MDBX transaction.
WriteFlags
Write options.

Enums§

DatabaseEnvKind
Environment used when opening a MDBX environment. RO/RW.
EnvironmentKind
Determines how data is mapped into memory
Error
An MDBX error kind.
HandleSlowReadersReturnCode
Iter
An iterator over the key/value pairs in an MDBX database.
IterDup
An iterator over the keys and duplicate values in an MDBX database.
MaxReadTransactionDurationread-tx-timeouts
The maximum duration of a read transaction.
Mode
PageSize
SyncMode
MDBX sync mode

Constants§

GIGABYTE
1 GB in bytes
KILOBYTE
1 KB in bytes
MEGABYTE
1 MB in bytes
TERABYTE
1 TB in bytes

Traits§

TableObject
Implement this to be able to decode data values
TransactionKind

Functions§

create_db
Creates a new database at the specified path if it doesn’t exist. Does NOT create tables. Check init_db.
init_db
Opens up an existing database or creates a new one at the specified path. Creates tables defined in Tables if necessary. Read/Write mode.
init_db_for
Opens up an existing database or creates a new one at the specified path. Creates tables defined in the given TableSet if necessary. Read/Write mode.
open_db
Opens up an existing database. Read/Write mode with WriteMap enabled. It doesn’t create it or create tables if missing.
open_db_read_only
Opens up an existing database. Read only mode. It doesn’t create it or create tables if missing.

Type Aliases§

HandleSlowReadersCallback
Handle-Slow-Readers callback function to resolve database full/overflow issue due to a reader(s) which prevents the old data from being recycled.
Result
An MDBX result.