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§
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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,
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.