MaterializedCatalog

Struct MaterializedCatalog 

Source
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

Source

pub fn find_dictionary( &self, dictionary: DictionaryId, version: CommitVersion, ) -> Option<DictionaryDef>

Find a dictionary by ID at a specific version

Source

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

Source

pub fn set_dictionary( &self, id: DictionaryId, version: CommitVersion, dictionary: Option<DictionaryDef>, )

Source§

impl MaterializedCatalog

Source

pub fn find_flow(&self, flow: FlowId, version: CommitVersion) -> Option<FlowDef>

Find a flow by ID at a specific version

Source

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

Source

pub fn set_flow( &self, id: FlowId, version: CommitVersion, flow: Option<FlowDef>, )

Source§

impl MaterializedCatalog

Source

pub fn find_namespace( &self, namespace: NamespaceId, version: CommitVersion, ) -> Option<NamespaceDef>

Find a namespace by ID at a specific version

Source

pub fn find_namespace_by_name( &self, namespace: &str, version: CommitVersion, ) -> Option<NamespaceDef>

Find a namespace by name at a specific version

Source

pub fn set_namespace( &self, id: NamespaceId, version: CommitVersion, namespace: Option<NamespaceDef>, )

Source§

impl MaterializedCatalog

Source

pub fn find_operator_retention_policy( &self, operator: FlowNodeId, version: CommitVersion, ) -> Option<RetentionPolicy>

Find a retention policy for an operator at a specific version

Source

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

Source

pub fn find_primary_key( &self, primary_key_id: PrimaryKeyId, version: CommitVersion, ) -> Option<PrimaryKeyDef>

Find a primary key by ID at a specific version

Source

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

Source

pub fn find_source_retention_policy( &self, source: SourceId, version: CommitVersion, ) -> Option<RetentionPolicy>

Find a retention policy for a source at a specific version

Source

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

Source

pub fn find_table( &self, table: TableId, version: CommitVersion, ) -> Option<TableDef>

Find a table by ID at a specific version

Source

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

Source

pub fn set_table( &self, id: TableId, version: CommitVersion, table: Option<TableDef>, )

Source§

impl MaterializedCatalog

Source

pub fn find_view(&self, view: ViewId, version: CommitVersion) -> Option<ViewDef>

Find a view by ID at a specific version

Source

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

Source

pub fn set_view( &self, id: ViewId, version: CommitVersion, view: Option<ViewDef>, )

Source§

impl MaterializedCatalog

Source

pub fn new() -> Self

Source

pub fn set_system_catalog(&self, catalog: SystemCatalog)

Set the system catalog (called once during database initialization)

Source

pub fn system_catalog(&self) -> Option<&SystemCatalog>

Get the system catalog

Source

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.

Source

pub fn unregister_table_virtual_user( &self, namespace: NamespaceId, name: &str, ) -> Result<()>

Unregister a user-defined virtual table by namespace and name

Source

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

Source

pub fn find_table_virtual_user( &self, id: TableVirtualId, ) -> Option<Arc<TableVirtualDef>>

Find a user-defined virtual table by ID

Source

pub fn list_table_virtual_user_in_namespace( &self, namespace: NamespaceId, ) -> Vec<Arc<TableVirtualDef>>

List all user-defined virtual tables in a namespace

Source

pub fn list_table_virtual_user_all(&self) -> Vec<Arc<TableVirtualDef>>

List all user-defined virtual tables

Trait Implementations§

Source§

impl Clone for MaterializedCatalog

Source§

fn clone(&self) -> MaterializedCatalog

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MaterializedCatalog

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MaterializedCatalog

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Deref for MaterializedCatalog

Source§

type Target = MaterializedCatalogInner

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more