Skip to main content

coven_database/
open_step.rs

1//! The steps of opening a store for writing, which a host draws a bar for
2//! (§4, api.md E1).
3
4/// A step of opening a store for writing (§4), in the order they run. A
5/// step runs only when it has work to do, so most opens report none.
6#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7pub enum OpenStep {
8    /// Rebuilding the indexes a new version of SQLite, or of one of the
9    /// app's collations or functions, changed. Done and total count
10    /// rebuilds: one for each index, and one for all the indexes in a
11    /// collation, which SQLite rebuilds together.
12    Rebuilding,
13    /// Running the app's migrations the store hasn't run yet. Done and total
14    /// count migrations.
15    Migrating,
16}
17
18#[cfg(test)]
19#[path = "open_step_tests.rs"]
20mod tests;