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
/*!
SQLite-backed metadata storage for the Hardy BPA.
This crate provides a persistent [`MetadataStorage`](hardy_bpa::storage::MetadataStorage)
implementation that stores bundle metadata in a SQLite database. It handles
schema migrations, connection pooling, serialized write access, and the
startup recovery protocol (mark-unconfirmed / confirm / sweep).
# Key types
- [`Config`] -- database directory and filename settings (serde-deserializable).
- [`new()`] -- constructs an `Arc<dyn MetadataStorage>` ready for use by the BPA.
*/
pub use Config;
use *;
use ;
use instrument;
use OptionalExtension;
/// Creates a new SQLite metadata storage instance.
///
/// Opens (or creates) the database specified by `config`, runs schema migrations
/// when `upgrade` is `true`, and returns the storage behind an `Arc<dyn MetadataStorage>`.