use crate::prelude::*;
mod private
{
pub trait Connection {}
}
pub(crate) use private::Connection as ConnectionPrivate;
/// Base trait for kDB Connection
pub trait Connection: ConnectionPrivate + Clone + Sync + Send
{
fn is_connected(&self) -> impl std::future::Future<Output = bool>;
fn execute_query<TQuery>(
&self,
query: TQuery,
) -> Result<impl std::future::Future<Output = Result<dbc::Result>>>
where
TQuery: TryInto<dbc::Query>,
crate::Error: From<<TQuery as TryInto<dbc::Query>>::Error>;
}