zino_connector

Trait DataFrameExecutor

Source
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§

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.

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.

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§