pub trait Adapter: Send + Sync {
// Required methods
fn execute(
&self,
query: &str,
params: &[Parameter],
optimize: bool,
write: bool,
) -> Result<Rows, DactylError>;
fn execute_raw(
&self,
query: &str,
params: &[Parameter],
) -> Result<u64, DactylError>;
fn execute_batch(
&self,
statements: &[Statement],
) -> Result<Vec<Rows>, DactylError>;
}Expand description
Internal trait every adapter implements.
Required Methods§
Sourcefn execute(
&self,
query: &str,
params: &[Parameter],
optimize: bool,
write: bool,
) -> Result<Rows, DactylError>
fn execute( &self, query: &str, params: &[Parameter], optimize: bool, write: bool, ) -> Result<Rows, DactylError>
Execute a query against the backing datastore.
Sourcefn execute_raw(
&self,
query: &str,
params: &[Parameter],
) -> Result<u64, DactylError>
fn execute_raw( &self, query: &str, params: &[Parameter], ) -> Result<u64, DactylError>
Execute a raw schema/DDL/migration operation.
Sourcefn execute_batch(
&self,
statements: &[Statement],
) -> Result<Vec<Rows>, DactylError>
fn execute_batch( &self, statements: &[Statement], ) -> Result<Vec<Rows>, DactylError>
Execute an atomic batch of statements.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".