pub trait QueryExecutor {
type Error: Error + Send + Sync + 'static;
// Required methods
fn fetch_all(
&self,
query: &CompiledQuery,
) -> Result<Vec<Record>, Self::Error>;
fn execute(&self, query: &CompiledQuery) -> Result<u64, Self::Error>;
// Provided methods
fn begin_transaction(&self) -> Result<GraphTransactionBoundary, Self::Error> { ... }
fn commit_transaction(&self) -> Result<(), Self::Error> { ... }
fn rollback_transaction(&self) -> Result<(), Self::Error> { ... }
}Required Associated Types§
Required Methods§
fn fetch_all(&self, query: &CompiledQuery) -> Result<Vec<Record>, Self::Error>
fn execute(&self, query: &CompiledQuery) -> Result<u64, Self::Error>
Provided Methods§
fn begin_transaction(&self) -> Result<GraphTransactionBoundary, Self::Error>
fn commit_transaction(&self) -> Result<(), Self::Error>
fn rollback_transaction(&self) -> Result<(), Self::Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".