Skip to main content

ViewStore

Trait ViewStore 

Source
pub trait ViewStore:
    Send
    + Sync
    + Debug {
    // Required methods
    fn list_views<'life0, 'life1, 'async_trait>(
        &'life0 self,
        namespace: &'life1 [String],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, AppError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn view_exists<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        namespace: &'life1 [String],
        name: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<bool, AppError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn load_view<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        namespace: &'life1 [String],
        name: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<(String, ViewMetadata)>, AppError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn create_view<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        namespace: &'life1 [String],
        name: &'life2 str,
        metadata_location: String,
        metadata: ViewMetadata,
    ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn update_view<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        namespace: &'life1 [String],
        name: &'life2 str,
        metadata_location: String,
        metadata: ViewMetadata,
    ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn drop_view<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        namespace: &'life1 [String],
        name: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn rename_view<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        src_namespace: &'life1 [String],
        src_name: &'life2 str,
        dest_namespace: &'life3 [String],
        dest_name: &'life4 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;
}
Expand description

Trait for view storage implementations.

Provides async methods for CRUD operations on Iceberg views. Implementations include in-memory storage (for development) and SlateDB-backed storage (for production persistence).

Required Methods§

Source

fn list_views<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, AppError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Lists all view names in a namespace.

Source

fn view_exists<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, namespace: &'life1 [String], name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<bool, AppError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Checks if a view exists.

Source

fn load_view<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, namespace: &'life1 [String], name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<(String, ViewMetadata)>, AppError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Loads a view by namespace and name. Returns (metadata_location, metadata) if found.

Source

fn create_view<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, namespace: &'life1 [String], name: &'life2 str, metadata_location: String, metadata: ViewMetadata, ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Creates a new view. Returns error if view already exists.

Source

fn update_view<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, namespace: &'life1 [String], name: &'life2 str, metadata_location: String, metadata: ViewMetadata, ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Updates an existing view. Returns error if view doesn’t exist.

Source

fn drop_view<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, namespace: &'life1 [String], name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Drops a view. Returns error if view doesn’t exist.

Source

fn rename_view<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, src_namespace: &'life1 [String], src_name: &'life2 str, dest_namespace: &'life3 [String], dest_name: &'life4 str, ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Renames a view. Returns error if source doesn’t exist or dest exists.

Implementors§