pub trait DataFrameExecutor {
// Required methods
async fn execute(self) -> Result<Option<u64>, Error>;
async fn query(self) -> Result<Vec<Record>, Error>;
async fn query_as<T: DeserializeOwned>(self) -> Result<Vec<T>, Error>;
async fn query_one(self) -> Result<Option<Record>, Error>;
async fn query_one_as<T: DeserializeOwned>(self) -> Result<Option<T>, Error>;
async fn output(self) -> Result<String, Error>;
}
Available on crate feature
connector-arrow
only.Expand description
Executor trait for DataFrame
.
Required Methods§
Sourceasync fn execute(self) -> Result<Option<u64>, Error>
async fn execute(self) -> Result<Option<u64>, Error>
Executes the DataFrame
and returns the total number of rows affected.
Sourceasync fn query(self) -> Result<Vec<Record>, Error>
async fn query(self) -> Result<Vec<Record>, Error>
Executes the DataFrame
and parses it as Vec<Record>
.
Sourceasync fn query_as<T: DeserializeOwned>(self) -> Result<Vec<T>, Error>
async fn query_as<T: DeserializeOwned>(self) -> Result<Vec<T>, Error>
Executes the DataFrame
and parses it as Vec<T>
.
Sourceasync fn query_one(self) -> Result<Option<Record>, Error>
async fn query_one(self) -> Result<Option<Record>, Error>
Executes the DataFrame
and parses it as a Record
.
Sourceasync fn query_one_as<T: DeserializeOwned>(self) -> Result<Option<T>, Error>
async fn query_one_as<T: DeserializeOwned>(self) -> Result<Option<T>, Error>
Executes the DataFrame
and parses it as an instance of type T
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.