pub struct SqliteOptions {
pub db_path: PathBuf,
pub translate_placeholders: bool,
pub pool_options: MiddlewarePoolOptions,
pub statement_cache_mode: StatementCacheMode,
pub statement_cache_capacity: Option<usize>,
}Expand description
Options for configuring a SQLite pool.
Fields§
§db_path: PathBuf§translate_placeholders: bool§pool_options: MiddlewarePoolOptions§statement_cache_mode: StatementCacheMode§statement_cache_capacity: Option<usize>Implementations§
Source§impl SqliteOptions
impl SqliteOptions
pub fn new(db_path: String) -> Self
pub fn from_path(db_path: impl Into<PathBuf>) -> Self
pub fn with_translation(self, translate_placeholders: bool) -> Self
pub fn with_pool_options(self, pool_options: MiddlewarePoolOptions) -> Self
pub fn with_statement_cache( self, statement_cache_mode: StatementCacheMode, ) -> Self
pub fn with_statement_cache_capacity(self, capacity: usize) -> Self
pub fn with_test_on_check_out(self, test_on_check_out: bool) -> Self
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SqliteOptions
impl RefUnwindSafe for SqliteOptions
impl Send for SqliteOptions
impl Sync for SqliteOptions
impl Unpin for SqliteOptions
impl UnsafeUnpin 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