pub trait SessionFsSqliteProvider: Send + Sync {
// Required methods
fn sqlite_query<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query_type: SessionFsSqliteQueryType,
query: &'life1 str,
params: Option<&'life2 HashMap<String, Value>>,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionFsSqliteQueryResult>, FsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn sqlite_exists<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, FsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Optional trait for providers that support SQLite operations.
Providers are already session-scoped (created per session by the factory),
so these methods do not take a session_id parameter.
To opt in, implement this trait on your provider and override
SessionFsProvider::sqlite to return Some(self):
ⓘ
impl SessionFsSqliteProvider for MyProvider { /* ... */ }
#[async_trait]
impl SessionFsProvider for MyProvider {
fn sqlite(&self) -> Option<&dyn SessionFsSqliteProvider> {
Some(self)
}
// ... other methods ...
}Required Methods§
Sourcefn sqlite_query<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query_type: SessionFsSqliteQueryType,
query: &'life1 str,
params: Option<&'life2 HashMap<String, Value>>,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionFsSqliteQueryResult>, FsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sqlite_query<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query_type: SessionFsSqliteQueryType,
query: &'life1 str,
params: Option<&'life2 HashMap<String, Value>>,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionFsSqliteQueryResult>, FsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute a SQLite query against the provider’s per-session database.