spin_factor_sqlite

Trait Connection

Source
pub trait Connection: Send + Sync {
    // Required methods
    fn query<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
        parameters: Vec<Value>,
    ) -> Pin<Box<dyn Future<Output = Result<QueryResult, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn execute_batch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        statements: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn summary(&self) -> Option<String> { ... }
}
Expand description

A trait abstracting over operations to a SQLite database

Required Methods§

Source

fn query<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 str, parameters: Vec<Value>, ) -> Pin<Box<dyn Future<Output = Result<QueryResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn execute_batch<'life0, 'life1, 'async_trait>( &'life0 self, statements: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn summary(&self) -> Option<String>

A human-readable summary of the connection’s configuration

Example: “libSQL at libsql://example.com”

Implementors§