Struct parity_db::Db

source ·
pub struct Db { /* private fields */ }

Implementations§

Open the database with given options.

Create the database using given options.

Read the database using given options

Get a value in a specified column by key. Returns None if the key does not exist.

Get value size by key. Returns None if the key does not exist.

Iterate over all ordered key-value pairs. Only supported for columns configured with btree_indexed.

Commit a set of changes to the database.

Commit a set of changes to the database.

Returns the number of columns in the database.

Iterate a column and call a function for each value. This is only supported for columns with btree_index set to false. Iteration order is unspecified. Note that the key field in the state is the hash of the original key. Unlinke get the iteration may not include changes made in recent commit calls.

Print database contents in text form to stderr.

Get database statistics.

Add a new column with options specified by new_column_options.

Trait Implementations§

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.