Skip to main content

RemoteSourceExt

Trait RemoteSourceExt 

Source
pub trait RemoteSourceExt: RemoteSource {
    // Provided method
    fn query_as<'life0, 'life1, 'life2, 'async_trait, T>(
        &'life0 self,
        sql: &'life1 str,
        params: &'life2 [DbValue],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, DbkitError>> + Send + 'async_trait>>
       where T: DeserializeOwned + 'async_trait,
             Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}
Expand description

Typed querying for any RemoteSource.

Kept separate from RemoteSource so the base trait stays object-safe — this generic method is provided by a blanket impl and is callable on concrete sources and on &dyn RemoteSource alike.

Provided Methods§

Source

fn query_as<'life0, 'life1, 'life2, 'async_trait, T>( &'life0 self, sql: &'life1 str, params: &'life2 [DbValue], ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, DbkitError>> + Send + 'async_trait>>
where T: DeserializeOwned + 'async_trait, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Run a query and deserialize each row into T (via serde_arrow).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<S: RemoteSource + ?Sized> RemoteSourceExt for S

Available on crate feature _read-typed only.