pub struct MaterializedCatalog(/* private fields */);Expand description
A materialized catalog that stores multi namespace, store::table, and view definitions. This provides fast O(1) lookups for catalog metadata without hitting storage.
Implementations§
Source§impl MaterializedCatalog
impl MaterializedCatalog
Sourcepub fn find_dictionary(
&self,
dictionary: DictionaryId,
version: CommitVersion,
) -> Option<DictionaryDef>
pub fn find_dictionary( &self, dictionary: DictionaryId, version: CommitVersion, ) -> Option<DictionaryDef>
Find a dictionary by ID at a specific version
Sourcepub fn find_dictionary_by_name(
&self,
namespace: NamespaceId,
name: &str,
version: CommitVersion,
) -> Option<DictionaryDef>
pub fn find_dictionary_by_name( &self, namespace: NamespaceId, name: &str, version: CommitVersion, ) -> Option<DictionaryDef>
Find a dictionary by name in a namespace at a specific version
pub fn set_dictionary( &self, id: DictionaryId, version: CommitVersion, dictionary: Option<DictionaryDef>, )
Source§impl MaterializedCatalog
impl MaterializedCatalog
Sourcepub fn find_flow(&self, flow: FlowId, version: CommitVersion) -> Option<FlowDef>
pub fn find_flow(&self, flow: FlowId, version: CommitVersion) -> Option<FlowDef>
Find a flow by ID at a specific version
Sourcepub fn find_flow_by_name(
&self,
namespace: NamespaceId,
name: &str,
version: CommitVersion,
) -> Option<FlowDef>
pub fn find_flow_by_name( &self, namespace: NamespaceId, name: &str, version: CommitVersion, ) -> Option<FlowDef>
Find a flow by name in a namespace at a specific version
pub fn set_flow( &self, id: FlowId, version: CommitVersion, flow: Option<FlowDef>, )
Source§impl MaterializedCatalog
impl MaterializedCatalog
Sourcepub fn find_namespace(
&self,
namespace: NamespaceId,
version: CommitVersion,
) -> Option<NamespaceDef>
pub fn find_namespace( &self, namespace: NamespaceId, version: CommitVersion, ) -> Option<NamespaceDef>
Find a namespace by ID at a specific version
Sourcepub fn find_namespace_by_name(
&self,
namespace: &str,
version: CommitVersion,
) -> Option<NamespaceDef>
pub fn find_namespace_by_name( &self, namespace: &str, version: CommitVersion, ) -> Option<NamespaceDef>
Find a namespace by name at a specific version
pub fn set_namespace( &self, id: NamespaceId, version: CommitVersion, namespace: Option<NamespaceDef>, )
Source§impl MaterializedCatalog
impl MaterializedCatalog
Sourcepub fn find_operator_retention_policy(
&self,
operator: FlowNodeId,
version: CommitVersion,
) -> Option<RetentionPolicy>
pub fn find_operator_retention_policy( &self, operator: FlowNodeId, version: CommitVersion, ) -> Option<RetentionPolicy>
Find a retention policy for an operator at a specific version
Sourcepub fn set_operator_retention_policy(
&self,
operator: FlowNodeId,
version: CommitVersion,
policy: Option<RetentionPolicy>,
)
pub fn set_operator_retention_policy( &self, operator: FlowNodeId, version: CommitVersion, policy: Option<RetentionPolicy>, )
Set a retention policy for an operator at a specific version
Source§impl MaterializedCatalog
impl MaterializedCatalog
Sourcepub fn find_primary_key(
&self,
primary_key_id: PrimaryKeyId,
version: CommitVersion,
) -> Option<PrimaryKeyDef>
pub fn find_primary_key( &self, primary_key_id: PrimaryKeyId, version: CommitVersion, ) -> Option<PrimaryKeyDef>
Find a primary key by ID at a specific version
Sourcepub fn set_primary_key(
&self,
id: PrimaryKeyId,
version: CommitVersion,
primary_key: Option<PrimaryKeyDef>,
)
pub fn set_primary_key( &self, id: PrimaryKeyId, version: CommitVersion, primary_key: Option<PrimaryKeyDef>, )
Set or update a primary key at a specific version
Source§impl MaterializedCatalog
impl MaterializedCatalog
Sourcepub fn find_source_retention_policy(
&self,
source: SourceId,
version: CommitVersion,
) -> Option<RetentionPolicy>
pub fn find_source_retention_policy( &self, source: SourceId, version: CommitVersion, ) -> Option<RetentionPolicy>
Find a retention policy for a source at a specific version
Sourcepub fn set_source_retention_policy(
&self,
source: SourceId,
version: CommitVersion,
policy: Option<RetentionPolicy>,
)
pub fn set_source_retention_policy( &self, source: SourceId, version: CommitVersion, policy: Option<RetentionPolicy>, )
Set a retention policy for a source at a specific version
Source§impl MaterializedCatalog
impl MaterializedCatalog
Sourcepub fn find_table(
&self,
table: TableId,
version: CommitVersion,
) -> Option<TableDef>
pub fn find_table( &self, table: TableId, version: CommitVersion, ) -> Option<TableDef>
Find a table by ID at a specific version
Sourcepub fn find_table_by_name(
&self,
namespace: NamespaceId,
name: &str,
version: CommitVersion,
) -> Option<TableDef>
pub fn find_table_by_name( &self, namespace: NamespaceId, name: &str, version: CommitVersion, ) -> Option<TableDef>
Find a table by name in a namespace at a specific version
pub fn set_table( &self, id: TableId, version: CommitVersion, table: Option<TableDef>, )
Source§impl MaterializedCatalog
impl MaterializedCatalog
Sourcepub fn find_view(&self, view: ViewId, version: CommitVersion) -> Option<ViewDef>
pub fn find_view(&self, view: ViewId, version: CommitVersion) -> Option<ViewDef>
Find a view by ID at a specific version
Sourcepub fn find_view_by_name(
&self,
namespace: NamespaceId,
name: &str,
version: CommitVersion,
) -> Option<ViewDef>
pub fn find_view_by_name( &self, namespace: NamespaceId, name: &str, version: CommitVersion, ) -> Option<ViewDef>
Find a view by name in a namespace at a specific version
pub fn set_view( &self, id: ViewId, version: CommitVersion, view: Option<ViewDef>, )
Source§impl MaterializedCatalog
impl MaterializedCatalog
pub fn new() -> Self
Sourcepub fn set_system_catalog(&self, catalog: SystemCatalog)
pub fn set_system_catalog(&self, catalog: SystemCatalog)
Set the system catalog (called once during database initialization)
Sourcepub fn system_catalog(&self) -> Option<&SystemCatalog>
pub fn system_catalog(&self) -> Option<&SystemCatalog>
Get the system catalog
Sourcepub fn register_table_virtual_user(
&self,
def: Arc<TableVirtualDef>,
) -> Result<()>
pub fn register_table_virtual_user( &self, def: Arc<TableVirtualDef>, ) -> Result<()>
Register a user-defined virtual table
Returns an error if a virtual table with the same name already exists in the namespace.
Sourcepub fn unregister_table_virtual_user(
&self,
namespace: NamespaceId,
name: &str,
) -> Result<()>
pub fn unregister_table_virtual_user( &self, namespace: NamespaceId, name: &str, ) -> Result<()>
Unregister a user-defined virtual table by namespace and name
Sourcepub fn find_table_virtual_user_by_name(
&self,
namespace: NamespaceId,
name: &str,
) -> Option<Arc<TableVirtualDef>>
pub fn find_table_virtual_user_by_name( &self, namespace: NamespaceId, name: &str, ) -> Option<Arc<TableVirtualDef>>
Find a user-defined virtual table by namespace and name
Sourcepub fn find_table_virtual_user(
&self,
id: TableVirtualId,
) -> Option<Arc<TableVirtualDef>>
pub fn find_table_virtual_user( &self, id: TableVirtualId, ) -> Option<Arc<TableVirtualDef>>
Find a user-defined virtual table by ID
Sourcepub fn list_table_virtual_user_in_namespace(
&self,
namespace: NamespaceId,
) -> Vec<Arc<TableVirtualDef>>
pub fn list_table_virtual_user_in_namespace( &self, namespace: NamespaceId, ) -> Vec<Arc<TableVirtualDef>>
List all user-defined virtual tables in a namespace
Sourcepub fn list_table_virtual_user_all(&self) -> Vec<Arc<TableVirtualDef>>
pub fn list_table_virtual_user_all(&self) -> Vec<Arc<TableVirtualDef>>
List all user-defined virtual tables
Trait Implementations§
Source§impl Clone for MaterializedCatalog
impl Clone for MaterializedCatalog
Source§fn clone(&self) -> MaterializedCatalog
fn clone(&self) -> MaterializedCatalog
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more