mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-11-16 21:37:45 +00:00
23 lines
436 B
Rust
23 lines
436 B
Rust
use std::str::FromStr;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub enum SqliteLockingMode {
|
|
Normal,
|
|
Exclusive,
|
|
}
|
|
|
|
impl SqliteLockingMode {
|
|
pub(crate) fn as_str(&self) -> &'static str {
|
|
match self {
|
|
SqliteLockingMode::Normal => "NORMAL",
|
|
SqliteLockingMode::Exclusive => "EXCLUSIVE",
|
|
}
|
|
}
|
|
}
|
|
|
|
impl Default for SqliteLockingMode {
|
|
fn default() -> Self {
|
|
SqliteLockingMode::Normal
|
|
}
|
|
}
|