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 features connector-arrow and connector only.
Expand description

Executor trait for DataFrame.

Required Methods§

source

async fn execute(self) -> Result<Option<u64>, Error>

Executes the DataFrame and returns the total number of rows affected.

source

async fn query(self) -> Result<Vec<Record>, Error>

Executes the DataFrame and parses it as Vec<Record>.

source

async fn query_as<T: DeserializeOwned>(self) -> Result<Vec<T>, Error>

Executes the DataFrame and parses it as Vec<T>.

source

async fn query_one(self) -> Result<Option<Record>, Error>

Executes the DataFrame and parses it as a Record.

source

async fn query_one_as<T: DeserializeOwned>(self) -> Result<Option<T>, Error>

Executes the DataFrame and parses it as an instance of type T.

source

async fn output(self) -> Result<String, Error>

Executes the DataFrame and creates a visual representation of record batches.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl DataFrameExecutor for DataFrame

source§

async fn execute(self) -> Result<Option<u64>, Error>

source§

async fn query(self) -> Result<Vec<Record>, Error>

source§

async fn query_as<T: DeserializeOwned>(self) -> Result<Vec<T>, Error>

source§

async fn query_one(self) -> Result<Option<Record>, Error>

source§

async fn query_one_as<T: DeserializeOwned>(self) -> Result<Option<T>, Error>

source§

async fn output(self) -> Result<String, Error>

Implementors§