use crate::error::ScyllaxError;
use async_trait::async_trait;
use scylla::{
frame::value::{SerializeValuesError, SerializedValues},
QueryResult,
};
pub type SerializedValuesResult = std::result::Result<SerializedValues, SerializeValuesError>;
pub trait Query {
fn query() -> String;
fn bind(&self) -> SerializedValuesResult;
}
#[async_trait]
pub trait ReadQuery {
type Output: Clone + std::fmt::Debug + Send + Sync;
async fn parse_response(rows: QueryResult) -> Result<Self::Output, ScyllaxError>;
}
pub trait WriteQuery {}