Trait DatabaseService

Source
pub trait DatabaseService:
    Service
    + Send
    + Sync {
    // Required methods
    fn get_database_metadata<'life0, 'async_trait>(
        &'life0 self,
        id: MetabaseId,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<DatabaseMetadata>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sync_database_schema<'life0, 'async_trait>(
        &'life0 self,
        id: MetabaseId,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<SyncResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_database_fields<'life0, 'async_trait>(
        &'life0 self,
        id: MetabaseId,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<Field>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_database_schemas<'life0, 'async_trait>(
        &'life0 self,
        id: MetabaseId,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<String>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_databases<'life0, 'async_trait>(
        &'life0 self,
        pagination: Option<PaginationParams>,
        filters: Option<DatabaseFilterParams>,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<DatabaseMetadata>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn validate_database_id<'life0, 'async_trait>(
        &'life0 self,
        id: MetabaseId,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Service trait for database operations

Required Methods§

Source

fn get_database_metadata<'life0, 'async_trait>( &'life0 self, id: MetabaseId, ) -> Pin<Box<dyn Future<Output = ServiceResult<DatabaseMetadata>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get database metadata

Source

fn sync_database_schema<'life0, 'async_trait>( &'life0 self, id: MetabaseId, ) -> Pin<Box<dyn Future<Output = ServiceResult<SyncResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Sync database schema

Source

fn get_database_fields<'life0, 'async_trait>( &'life0 self, id: MetabaseId, ) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<Field>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get database fields

Source

fn get_database_schemas<'life0, 'async_trait>( &'life0 self, id: MetabaseId, ) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get database schemas

Source

fn list_databases<'life0, 'async_trait>( &'life0 self, pagination: Option<PaginationParams>, filters: Option<DatabaseFilterParams>, ) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<DatabaseMetadata>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List databases

Source

fn validate_database_id<'life0, 'async_trait>( &'life0 self, id: MetabaseId, ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Validate database ID

Implementors§