use arrow::record_batch::RecordBatch;
pub trait OltpEngine: Send + Sync {
type Error: std::error::Error + Send + Sync + 'static;
fn query(
&self,
sql: &str,
params: &[serde_json::Value],
) -> impl std::future::Future<Output = Result<Vec<RecordBatch>, Self::Error>> + Send;
fn execute(
&self,
sql: &str,
params: &[serde_json::Value],
) -> impl std::future::Future<Output = Result<u64, Self::Error>> + Send;
fn execute_batch(
&self,
statements: &[(String, Vec<serde_json::Value>)],
) -> impl std::future::Future<Output = Result<(), Self::Error>> + Send;
fn table_exists(
&self,
table_name: &str,
) -> impl std::future::Future<Output = Result<bool, Self::Error>> + Send;
}