pub struct QueryEngine { /* private fields */ }Expand description
Query engine that combines all components.
Implementations§
Source§impl QueryEngine
impl QueryEngine
Sourcepub fn with_config(
optimizer_config: OptimizerConfig,
cache_config: CacheConfig,
) -> Self
pub fn with_config( optimizer_config: OptimizerConfig, cache_config: CacheConfig, ) -> Self
Create a new query engine with custom configuration.
Sourcepub fn cache(&self) -> &QueryCache
pub fn cache(&self) -> &QueryCache
Get the cache.
Sourcepub async fn execute_sql(&mut self, sql: &str) -> Result<Vec<RecordBatch>>
pub async fn execute_sql(&mut self, sql: &str) -> Result<Vec<RecordBatch>>
Execute a SQL query.
Sourcepub fn explain_sql(&self, sql: &str) -> Result<ExplainPlan>
pub fn explain_sql(&self, sql: &str) -> Result<ExplainPlan>
Explain a SQL query.
Sourcepub fn register_data_source(
&mut self,
name: String,
source: Arc<dyn DataSource>,
)
pub fn register_data_source( &mut self, name: String, source: Arc<dyn DataSource>, )
Register a data source.
Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Clear the query cache.
Sourcepub fn cache_statistics(&self) -> CacheStatistics
pub fn cache_statistics(&self) -> CacheStatistics
Get cache statistics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueryEngine
impl !RefUnwindSafe for QueryEngine
impl Send for QueryEngine
impl Sync for QueryEngine
impl Unpin for QueryEngine
impl UnsafeUnpin for QueryEngine
impl !UnwindSafe for QueryEngine
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> 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