cdrs_async/query/
batch_executor.rs

1use std::pin::Pin;
2
3use async_trait::async_trait;
4use cassandra_proto::{error, frame::Frame, query::QueryBatch};
5
6/// Traits that provides methods for sending multiple queries
7/// to a DB server.
8#[async_trait]
9pub trait BatchExecutor: Send {
10  async fn batch_with_params_tw(
11    mut self: Pin<&mut Self>,
12    batch: QueryBatch,
13    with_tracing: bool,
14    with_warnings: bool,
15  ) -> error::Result<Frame>;
16
17  async fn batch_with_params(mut self: Pin<&mut Self>, batch: QueryBatch) -> error::Result<Frame> {
18    self.batch_with_params_tw(batch, false, false).await
19  }
20}