pub struct ArrowConnector { /* private fields */ }
Available on crate feature
connector-arrow
only.Expand description
A connector for Apache Arrow.
Implementations§
Source§impl ArrowConnector
impl ArrowConnector
Sourcepub fn with_config(config: &Table) -> Self
pub fn with_config(config: &Table) -> Self
Creates a new instance with the configuration.
Sourcepub async fn bind_system_variables(&mut self, variables: &Table)
pub async fn bind_system_variables(&mut self, variables: &Table)
Binds system variables.
Sourcepub async fn bind_user_defined_variables(&mut self, variables: &Map)
pub async fn bind_user_defined_variables(&mut self, variables: &Map)
Binds user defined variables.
Sourcepub async fn try_get_session_context(&self) -> Result<&SessionContext, Error>
pub async fn try_get_session_context(&self) -> Result<&SessionContext, Error>
Attempts to get the session context.
Trait Implementations§
Source§impl Connector for ArrowConnector
impl Connector for ArrowConnector
Source§fn try_new_data_source(config: &Table) -> Result<DataSource, Error>
fn try_new_data_source(config: &Table) -> Result<DataSource, Error>
Constructs a new data source with the configuration,
returning an error if it fails.
Source§async fn execute(
&self,
query: &str,
params: Option<&Map>,
) -> Result<Option<u64>, Error>
async fn execute( &self, query: &str, params: Option<&Map>, ) -> Result<Option<u64>, Error>
Executes the query and returns the total number of rows affected.
Source§async fn query(
&self,
query: &str,
params: Option<&Map>,
) -> Result<Vec<Record>, Error>
async fn query( &self, query: &str, params: Option<&Map>, ) -> Result<Vec<Record>, Error>
Executes the query and parses it as
Vec<Record>
.Source§async fn query_as<T: DeserializeOwned>(
&self,
query: &str,
params: Option<&Map>,
) -> Result<Vec<T>, Error>
async fn query_as<T: DeserializeOwned>( &self, query: &str, params: Option<&Map>, ) -> Result<Vec<T>, Error>
Executes the query and parses it as
Vec<T>
.Source§async fn query_one(
&self,
query: &str,
params: Option<&Map>,
) -> Result<Option<Record>, Error>
async fn query_one( &self, query: &str, params: Option<&Map>, ) -> Result<Option<Record>, Error>
Executes the query and parses it as a
Record
.Source§async fn query_one_as<T: DeserializeOwned>(
&self,
query: &str,
params: Option<&Map>,
) -> Result<Option<T>, Error>
async fn query_one_as<T: DeserializeOwned>( &self, query: &str, params: Option<&Map>, ) -> Result<Option<T>, Error>
Executes the query and parses it as an instance of type
T
.Auto Trait Implementations§
impl !Freeze for ArrowConnector
impl !RefUnwindSafe for ArrowConnector
impl Send for ArrowConnector
impl Sync for ArrowConnector
impl Unpin for ArrowConnector
impl !UnwindSafe for ArrowConnector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more