cdrs_async/query/
prepare_executor.rs1use std::pin::Pin;
2
3use async_trait::async_trait;
4use cassandra_proto::{error, types::CBytesShort};
5
6pub type PreparedQuery = CBytesShort;
9
10#[async_trait]
13pub trait PrepareExecutor {
14 async fn prepare_tw<Q: ToString + Send>(
18 mut self: Pin<&mut Self>,
19 query: Q,
20 with_tracing: bool,
21 with_warnings: bool,
22 ) -> error::Result<PreparedQuery>;
23
24 async fn prepare<Q: ToString + Send>(
26 mut self: Pin<&mut Self>,
27 query: Q,
28 ) -> error::Result<PreparedQuery> {
29 self.prepare_tw(query, false, false).await
30 }
31}