pub struct SqliteOptions {
pub journal_mode: SqliteJournalMode,
pub synchronous: SqliteSynchronous,
pub foreign_keys: bool,
pub busy_timeout: u32,
pub cache_size: i32,
}Expand description
SQLite-specific options.
Fields§
§journal_mode: SqliteJournalModeJournal mode.
synchronous: SqliteSynchronousSynchronous mode.
foreign_keys: boolForeign keys enforcement.
busy_timeout: u32Busy timeout in milliseconds.
cache_size: i32Cache size in pages (negative for KB).
Implementations§
Source§impl SqliteOptions
impl SqliteOptions
Sourcepub fn journal_mode(self, mode: SqliteJournalMode) -> Self
pub fn journal_mode(self, mode: SqliteJournalMode) -> Self
Set journal mode.
Sourcepub fn synchronous(self, mode: SqliteSynchronous) -> Self
pub fn synchronous(self, mode: SqliteSynchronous) -> Self
Set synchronous mode.
Sourcepub fn foreign_keys(self, enabled: bool) -> Self
pub fn foreign_keys(self, enabled: bool) -> Self
Enable/disable foreign keys.
Sourcepub fn busy_timeout(self, ms: u32) -> Self
pub fn busy_timeout(self, ms: u32) -> Self
Set busy timeout in milliseconds.
Sourcepub fn to_pragmas(&self) -> Vec<String>
pub fn to_pragmas(&self) -> Vec<String>
Generate PRAGMA statements.
Trait Implementations§
Source§impl Clone for SqliteOptions
impl Clone for SqliteOptions
Source§fn clone(&self) -> SqliteOptions
fn clone(&self) -> SqliteOptions
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 SqliteOptions
impl Debug for SqliteOptions
Auto Trait Implementations§
impl Freeze for SqliteOptions
impl RefUnwindSafe for SqliteOptions
impl Send for SqliteOptions
impl Sync for SqliteOptions
impl Unpin for SqliteOptions
impl UnwindSafe for SqliteOptions
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