use crate::{
prelude::*,
traits::{IdType, Property},
Query,
};
#[derive(Debug)]
pub enum QueryError<SourceError: std::fmt::Debug, ResultError: std::fmt::Debug> {
Left(SourceError),
Right(ResultError),
}
pub trait TripleStoreQuery<Id: IdType, NodeProps: Property, EdgeProps: Property>:
TripleStoreError
{
type QueryResult: TripleStore<Id, NodeProps, EdgeProps>;
type QueryResultError: std::fmt::Debug;
fn run(
&self,
query: Query<Id>,
) -> Result<Self::QueryResult, QueryError<Self::Error, Self::QueryResultError>>;
}