Trait scyllax::collection::QueryCollection

source ·
pub trait QueryCollection {
    // Required methods
    fn new<'life0, 'async_trait>(
        session: &'life0 Session
    ) -> Pin<Box<dyn Future<Output = Result<Self, ScyllaxError>> + Send + 'async_trait>>
       where Self: Sized + 'async_trait,
             'life0: 'async_trait;
    fn register_tasks(self, executor: Arc<Executor<Self>>) -> Self
       where Self: Sized;

    // Provided methods
    fn get_prepared<T: Query>(&self) -> &PreparedStatement
       where Self: GetPreparedStatement<T> { ... }
    fn get_task<T: Query + ReadQuery>(&self) -> &Sender<ShardMessage<T>>
       where Self: GetCoalescingSender<T> { ... }
}
Expand description

A collection of prepared statements.

Required Methods§

source

fn new<'life0, 'async_trait>( session: &'life0 Session ) -> Pin<Box<dyn Future<Output = Result<Self, ScyllaxError>> + Send + 'async_trait>>
where Self: Sized + 'async_trait, 'life0: 'async_trait,

Create a new collection of prepared statements.

source

fn register_tasks(self, executor: Arc<Executor<Self>>) -> Self
where Self: Sized,

Register all tasks with the executor.

Provided Methods§

source

fn get_prepared<T: Query>(&self) -> &PreparedStatement
where Self: GetPreparedStatement<T>,

Gets a prepared statement from the collection.

source

fn get_task<T: Query + ReadQuery>(&self) -> &Sender<ShardMessage<T>>
where Self: GetCoalescingSender<T>,

Gets a task from the collection.

Object Safety§

This trait is not object safe.

Implementors§