QuerySession

Trait QuerySession 

Source
pub trait QuerySession:
    Send
    + Sync
    + Clone {
    // Required methods
    fn as_session(&self) -> &SessionContext;
    fn capabilities(&self) -> &[SessionCapability];
    fn sql<'life0, 'life1, 'async_trait>(
        &'life0 self,
        sql: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<DataFrame>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Abstraction over a query-capable DataFusion session.

Required Methods§

Source

fn as_session(&self) -> &SessionContext

Access the underlying SessionContext for registration or low-level control.

Source

fn capabilities(&self) -> &[SessionCapability]

Source

fn sql<'life0, 'life1, 'async_trait>( &'life0 self, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<DataFrame>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute SQL and return a DataFrame for streaming.

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 QuerySession for SessionContext

Source§

fn as_session(&self) -> &SessionContext

Source§

fn capabilities(&self) -> &[SessionCapability]

Source§

fn sql<'life0, 'life1, 'async_trait>( &'life0 self, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<DataFrame>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§