1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! # SQLite Storage
//!
//! This crate provides the [`SqliteStorageProvider`] which implements the
//! OpenMLS trait [`StorageProvider`] using the `rusqlite` crate.
//!
//! ## Usage
//!
//! Generally, the [`SqliteStorageProvider`] can be used like any other storage
//! provider. However, before first use, the database needs to be initialized.
//! This is done using the [`SqliteStorageProvider::run_migrations()`] method.
//!
//! ### Codec
//!
//! The [`SqliteStorageProvider`] can be instantiated with any codec that make
//! use of the [`Serialize`] and [`DeserializeOwned`] traits of the `serde`
//! crate. The codec is set by implementing [`Codec`] and passing the
//! implementation as generic parameter to the [`SqliteStorageProvider`] upon
//! creation.
//!
//! ## Support
//!
//! The SQLite storage provider currently does not support the `wasm32` target.
use StorageProvider;
use ;
pub use Codec;
pub use Connection;
pub use SqliteStorageProvider;
/// The version of the storage provider. If the `CURRENT_VERSION` of the OpenMLS
/// storage provider trait changes, the read/write/delete functions of the
/// affected data types must be updated and a migration file must be created to
/// migrate the database's schema and its content. Only then may this version be
/// incremented to match the `CURRENT_VERSION`.
const STORAGE_PROVIDER_VERSION: u16 = 1;