Skip to main content

CollectionContext

Trait CollectionContext 

Source
pub trait CollectionContext: Send + Sync {
    // Required methods
    fn addr(&self) -> Result<&CollectionAddr, ODataError>;
    fn service_base_url(&self) -> Result<String, ODataError>;
    fn collection_base_url(&self) -> Result<String, ODataError>;
    fn collection_name(&self) -> Result<String, ODataError>;
    fn last_updated_time<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = DateTime<Utc>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn schema<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<SchemaRef, ODataError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn query<'life0, 'async_trait>(
        &'life0 self,
        query: QueryParams,
    ) -> Pin<Box<dyn Future<Output = Result<DataFrame, ODataError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn on_unsupported_feature(&self) -> OnUnsupported;

    // Provided methods
    fn collection_namespace(&self) -> Result<String, ODataError> { ... }
    fn key_column_alias(&self) -> String { ... }
    fn key_column(&self) -> Result<String, ODataError> { ... }
    fn validate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _record_batches: &'life1 [RecordBatch],
    ) -> Pin<Box<dyn Future<Output = Result<(), ODataError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Methods§

Source

fn addr(&self) -> Result<&CollectionAddr, ODataError>

Source

fn service_base_url(&self) -> Result<String, ODataError>

Source

fn collection_base_url(&self) -> Result<String, ODataError>

Source

fn collection_name(&self) -> Result<String, ODataError>

Source

fn last_updated_time<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = DateTime<Utc>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn schema<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<SchemaRef, ODataError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

Source

fn on_unsupported_feature(&self) -> OnUnsupported

Provided Methods§

Source

fn collection_namespace(&self) -> Result<String, ODataError>

Source

fn key_column_alias(&self) -> String

Source

fn key_column(&self) -> Result<String, ODataError>

Source

fn validate<'life0, 'life1, 'async_trait>( &'life0 self, _record_batches: &'life1 [RecordBatch], ) -> Pin<Box<dyn Future<Output = Result<(), ODataError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Validates the record batches that retunred from datafusion before encode them to xml

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§