use std::pin::Pin;
use async_trait::async_trait;
use cassandra_proto::{error, types::CBytesShort};
pub type PreparedQuery = CBytesShort;
#[async_trait]
pub trait PrepareExecutor {
async fn prepare_tw<Q: ToString + Send>(
mut self: Pin<&mut Self>,
query: Q,
with_tracing: bool,
with_warnings: bool,
) -> error::Result<PreparedQuery>;
async fn prepare<Q: ToString + Send>(
mut self: Pin<&mut Self>,
query: Q,
) -> error::Result<PreparedQuery> {
self.prepare_tw(query, false, false).await
}
}