Struct grebedb::Database[][src]

pub struct Database { /* fields omitted */ }
Expand description

GrebeDB database interface.

Implementations

Open a database using the given virtual file system and options.

Open a database in temporary memory.

Open a database to a path on the disk.

The path must be a directory.

Return database metadata information.

Return whether the key exists.

Retrieve a stored value, by its key, as a vector.

Retrieve a stored value, by its key, into the given buffer.

Returns true if the key-value pair was found. The vector will be cleared and resized.

Store a key-value pair.

Remove a key-value pair by its key.

No error occurs if the key does not exist.

Return a cursor for iterating all the key-value pairs.

Return a cursor for iterating all the key-value pairs within the given range.

This method is equivalent of obtaining a cursor and calling Cursor::seek() and Cursor::set_range()

Persist all modifications to the file system.

Calling this function ensures that all changes pending, whether cached in memory or in files, are atomically saved on the file system before this function returns. If the database is not flushed when dropped or the program exits, changes since the last successful flush will be discarded. This function effectively emulates a transaction.

For details about automatic flushing, see Options.

Check the database for internal consistency and data integrity.

The provided callback function is called with the number of items processed and the estimated number of items.

The function returns an error on the first verification failure or other error.

Print the tree for debugging purposes.

Trait Implementations

Formats the value using the given formatter. Read more

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

Performs the conversion.

Performs the conversion.

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.