rsdbc_sqlite/options/
locking_mode.rs

1// From SQLx - https://github.com/launchbadge/sqlx/blob/master/sqlx-core/src/sqlite/options/locking_mode.rs
2
3// TODO: is this the same thing as https://www.sqlite.org/lang_transaction.html?
4
5#[derive(Debug, Clone)]
6pub enum SqliteLockingMode {
7    Normal,
8    Exclusive,
9}
10
11impl SqliteLockingMode {
12    pub(crate) fn as_str(&self) -> &'static str {
13        match self {
14            SqliteLockingMode::Normal => "NORMAL",
15            SqliteLockingMode::Exclusive => "EXCLUSIVE",
16        }
17    }
18}
19
20impl Default for SqliteLockingMode {
21    fn default() -> Self {
22        SqliteLockingMode::Normal
23    }
24}