pub struct SqliteStorage { /* private fields */ }
Expand description

A Storage implementation based on an SQLite database.

Implementations§

Opens a new SQLite database in the given path.

If the database does not already exist it will be created.

use datacake_sqlite::SqliteStorage;

let storage = SqliteStorage::open("./data.db").await.expect("Create database");

Opens a new SQLite database in memory.

use datacake_sqlite::SqliteStorage;

let storage = SqliteStorage::open_in_memory().await.expect("Create database");

Creates a new SqliteStorage instances from an existing storage handle.

Creates a copy of the storage handle to be used in other sections of code which do not need to be distributed.

WARNING: Any changes made to this will not be reflected in the cluster, it is primarily only provided for ease of reading.

The table state_entries is already created and reserved.

Trait Implementations§

Retrieves all keyspace currently persisted.
Retrieves an iterator producing all values contained within the store. Read more
Remove a set of keys which are marked as tombstones store. Read more
Inserts or updates a document in the persistent store. Read more
Inserts or updates a set of documents in the persistent store. Read more
Marks a document in the store as a tombstone. Read more
Marks a set of documents in the store as a tombstone. Read more
Retrieves a single document belonging to a given keyspace from the store.
Retrieves a set of documents belonging to a given keyspace from the store. Read more
Inserts or updates a document in the persistent store. Read more
Inserts or updates a set of documents in the persistent store. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Deserializes using the given deserializer

Returns the argument unchanged.

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

Calls U::from(self).

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

Gets the layout of the type.
The type for metadata in pointers and references to 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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more