Struct schemadb::DB[][src]

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

This DB is a schematized RocksDB wrapper where all data passed in and out are typed according to Schemas.

Implementations

Create db with all the column families provided if it doesn’t exist at path; Otherwise, try to open it with all the column families.

Open db in readonly mode Note that this still assumes there’s only one process that opens the same DB. See open_as_secondary

Open db as secondary. This allows to read the DB in another process while it’s already opened for read / write in one (e.g. a Diem Node) https://github.com/facebook/rocksdb/blob/493f425e77043cc35ea2d89ee3c4ec0274c700cb/include/rocksdb/db.h#L176-L222

Reads single record by key.

Writes single record.

Delete all keys in range [begin, end).

SK has to be an explicit type parameter since https://github.com/rust-lang/rust/issues/44721

Returns a forward SchemaIterator on a certain schema.

Returns a backward SchemaIterator on a certain schema.

Writes a group of records wrapped in a SchemaBatch.

Flushes all memtable data. This is only used for testing get_approximate_sizes_cf in unit tests.

Creates new physical DB checkpoint in directory specified by path.

Trait Implementations

Formats the value using the given formatter. 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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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.