pub struct SqliteConfig {
pub without_migrations: bool,
pub cache_size: Option<usize>,
pub pragma_settings: HashMap<String, String>,
}Expand description
Configuration for SQLite backend operations.
Fields§
§without_migrations: boolSkip schema initialization during opening
cache_size: Option<usize>Optional cache size for prepared statements
pragma_settings: HashMap<String, String>Additional SQLite PRAGMA settings
Implementations§
Source§impl SqliteConfig
impl SqliteConfig
Sourcepub fn with_migrations_disabled(self, without_migrations: bool) -> Self
pub fn with_migrations_disabled(self, without_migrations: bool) -> Self
Set whether to skip schema initialization (builder pattern)
Sourcepub fn with_cache_size(self, cache_size: usize) -> Self
pub fn with_cache_size(self, cache_size: usize) -> Self
Set the prepared statement cache size (builder pattern)
Sourcepub fn with_pragma(self, key: &str, value: &str) -> Self
pub fn with_pragma(self, key: &str, value: &str) -> Self
Add a PRAGMA setting (builder pattern)
Sourcepub fn with_wal_mode(self) -> Self
pub fn with_wal_mode(self) -> Self
Configure for WAL mode (builder pattern convenience method)
Sourcepub fn with_performance_mode(self) -> Self
pub fn with_performance_mode(self) -> Self
Configure for better performance with some safety trade-offs
Trait Implementations§
Source§impl Clone for SqliteConfig
impl Clone for SqliteConfig
Source§fn clone(&self) -> SqliteConfig
fn clone(&self) -> SqliteConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SqliteConfig
impl Debug for SqliteConfig
Source§impl Default for SqliteConfig
impl Default for SqliteConfig
Source§fn default() -> SqliteConfig
fn default() -> SqliteConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SqliteConfig
impl RefUnwindSafe for SqliteConfig
impl Send for SqliteConfig
impl Sync for SqliteConfig
impl Unpin for SqliteConfig
impl UnwindSafe for SqliteConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more