CatalogStore

Struct CatalogStore 

Source
pub struct CatalogStore;

Implementations§

Source§

impl CatalogStore

Source

pub async fn find_column_by_name( rx: &mut impl QueryTransaction, source: impl Into<SourceId>, column_name: &str, ) -> Result<Option<ColumnDef>>

Source§

impl CatalogStore

Source

pub async fn get_column( rx: &mut impl QueryTransaction, column: ColumnId, ) -> Result<ColumnDef>

Source§

impl CatalogStore

Source

pub async fn list_columns( rx: &mut impl QueryTransaction, source: impl Into<SourceId>, ) -> Result<Vec<ColumnDef>>

Source

pub async fn list_columns_all( rx: &mut impl QueryTransaction, ) -> Result<Vec<ColumnInfo>>

Source§

impl CatalogStore

Source§

impl CatalogStore

Source

pub async fn create_dictionary( txn: &mut impl CommandTransaction, to_create: DictionaryToCreate, ) -> Result<DictionaryDef>

Source§

impl CatalogStore

Source

pub async fn find_dictionary( rx: &mut impl QueryTransaction, dictionary_id: DictionaryId, ) -> Result<Option<DictionaryDef>>

Source

pub async fn find_dictionary_by_name( rx: &mut impl QueryTransaction, namespace: NamespaceId, name: impl AsRef<str>, ) -> Result<Option<DictionaryDef>>

Source§

impl CatalogStore

Source

pub async fn get_dictionary( rx: &mut impl QueryTransaction, dictionary: DictionaryId, ) -> Result<DictionaryDef>

Source§

impl CatalogStore

Source

pub async fn list_dictionaries( rx: &mut impl QueryTransaction, namespace: NamespaceId, ) -> Result<Vec<DictionaryDef>>

List all dictionaries in a namespace

Source

pub async fn list_all_dictionaries( rx: &mut impl QueryTransaction, ) -> Result<Vec<DictionaryDef>>

List all dictionaries in the database

Source§

impl CatalogStore

Source

pub async fn create_flow( txn: &mut impl CommandTransaction, to_create: FlowToCreate, ) -> Result<FlowDef>

Source§

impl CatalogStore

Source

pub async fn delete_flow( txn: &mut impl CommandTransaction, flow_id: FlowId, ) -> Result<()>

Source§

impl CatalogStore

Source

pub async fn find_flow( rx: &mut impl QueryTransaction, id: FlowId, ) -> Result<Option<FlowDef>>

Source

pub async fn find_flow_by_name( rx: &mut impl QueryTransaction, namespace: NamespaceId, name: impl AsRef<str>, ) -> Result<Option<FlowDef>>

Source§

impl CatalogStore

Source

pub async fn get_flow( rx: &mut impl QueryTransaction, flow: FlowId, ) -> Result<FlowDef>

Source

pub async fn get_flow_by_name( rx: &mut impl QueryTransaction, namespace: NamespaceId, name: impl AsRef<str>, ) -> Result<FlowDef>

Source§

impl CatalogStore

Source

pub async fn list_flows_all( rx: &mut impl QueryTransaction, ) -> Result<Vec<FlowDef>>

Source§

impl CatalogStore

Source

pub async fn update_flow_name( txn: &mut impl CommandTransaction, flow_id: FlowId, new_name: String, ) -> Result<()>

Update the name of a flow

Source

pub async fn update_flow_status( txn: &mut impl CommandTransaction, flow_id: FlowId, status: FlowStatus, ) -> Result<()>

Update the status of a flow

Source§

impl CatalogStore

Source

pub async fn create_flow_edge( txn: &mut impl CommandTransaction, edge_def: &FlowEdgeDef, ) -> Result<()>

Source§

impl CatalogStore

Source

pub async fn delete_flow_edge( txn: &mut impl CommandTransaction, edge_id: FlowEdgeId, ) -> Result<()>

Source§

impl CatalogStore

Source

pub async fn find_flow_edge( txn: &mut impl QueryTransaction, edge: FlowEdgeId, ) -> Result<Option<FlowEdgeDef>>

Source§

impl CatalogStore

Source

pub async fn get_flow_edge( txn: &mut impl QueryTransaction, edge_id: FlowEdgeId, ) -> Result<FlowEdgeDef>

Source§

impl CatalogStore

Source

pub async fn list_flow_edges_by_flow( txn: &mut impl QueryTransaction, flow_id: FlowId, ) -> Result<Vec<FlowEdgeDef>>

Source

pub async fn list_flow_edges_all( txn: &mut impl QueryTransaction, ) -> Result<Vec<FlowEdgeDef>>

Source§

impl CatalogStore

Source

pub async fn create_flow_node( txn: &mut impl CommandTransaction, node_def: &FlowNodeDef, ) -> Result<()>

Source§

impl CatalogStore

Source

pub async fn delete_flow_node( txn: &mut impl CommandTransaction, node_id: FlowNodeId, ) -> Result<()>

Source§

impl CatalogStore

Source

pub async fn find_flow_node( txn: &mut impl QueryTransaction, node_id: FlowNodeId, ) -> Result<Option<FlowNodeDef>>

Source§

impl CatalogStore

Source

pub async fn get_flow_node( txn: &mut impl QueryTransaction, node_id: FlowNodeId, ) -> Result<FlowNodeDef>

Source§

impl CatalogStore

Source

pub async fn list_flow_nodes_by_flow( txn: &mut impl QueryTransaction, flow_id: FlowId, ) -> Result<Vec<FlowNodeDef>>

Source

pub async fn list_flow_nodes_all( txn: &mut impl QueryTransaction, ) -> Result<Vec<FlowNodeDef>>

Source§

impl CatalogStore

Source

pub async fn create_namespace( txn: &mut impl CommandTransaction, to_create: NamespaceToCreate, ) -> Result<NamespaceDef>

Source§

impl CatalogStore

Source

pub async fn find_namespace_by_name( rx: &mut impl QueryTransaction, name: impl AsRef<str>, ) -> Result<Option<NamespaceDef>>

Source

pub async fn find_namespace( rx: &mut impl QueryTransaction, id: NamespaceId, ) -> Result<Option<NamespaceDef>>

Source§

impl CatalogStore

Source

pub async fn get_namespace( rx: &mut impl QueryTransaction, namespace: NamespaceId, ) -> Result<NamespaceDef>

Source§

impl CatalogStore

Source§

impl CatalogStore

Source

pub async fn create_primary_key( txn: &mut impl CommandTransaction, to_create: PrimaryKeyToCreate, ) -> Result<PrimaryKeyId>

Source§

impl CatalogStore

Source

pub async fn find_primary_key( rx: &mut impl QueryTransaction, source: impl Into<SourceId>, ) -> Result<Option<PrimaryKeyDef>>

Source

pub async fn find_table_primary_key( rx: &mut impl QueryTransaction, table_id: TableId, ) -> Result<Option<PrimaryKeyDef>>

Source

pub async fn find_view_primary_key( rx: &mut impl QueryTransaction, view_id: ViewId, ) -> Result<Option<PrimaryKeyDef>>

Source§

impl CatalogStore

Source

pub async fn list_primary_keys( rx: &mut impl QueryTransaction, ) -> Result<Vec<PrimaryKeyInfo>>

Source

pub async fn list_primary_key_columns( rx: &mut impl QueryTransaction, ) -> Result<Vec<(u64, u64, usize)>>

Source§

impl CatalogStore

Source

pub async fn find_source_retention_policy( txn: &mut impl QueryTransaction, source: SourceId, ) -> Result<Option<RetentionPolicy>>

Find a retention policy for a source (table, view, or ring buffer) Returns None if no retention policy is set

Source

pub async fn find_operator_retention_policy( txn: &mut impl QueryTransaction, operator: FlowNodeId, ) -> Result<Option<RetentionPolicy>>

Find a retention policy for an operator Returns None if no retention policy is set

Source§

impl CatalogStore

Source

pub async fn get_source_retention_policy( txn: &mut impl QueryTransaction, source: SourceId, ) -> Result<RetentionPolicy>

Get a retention policy for a source (table, view, or ring buffer) Returns an error if no retention policy is set

Source

pub async fn get_operator_retention_policy( txn: &mut impl QueryTransaction, operator: FlowNodeId, ) -> Result<RetentionPolicy>

Get a retention policy for an operator (flow node) Returns an error if no retention policy is set

Source§

impl CatalogStore

Source

pub async fn list_source_retention_policies( rx: &mut impl QueryTransaction, ) -> Result<Vec<SourceRetentionPolicyEntry>>

List all retention policies for sources (tables, views, ring buffers)

Source

pub async fn list_operator_retention_policies( rx: &mut impl QueryTransaction, ) -> Result<Vec<OperatorRetentionPolicyEntry>>

List all retention policies for operators

Source§

impl CatalogStore

Source

pub async fn create_ringbuffer( txn: &mut impl CommandTransaction, to_create: RingBufferToCreate, ) -> Result<RingBufferDef>

Source§

impl CatalogStore

Source

pub async fn find_ringbuffer( rx: &mut impl QueryTransaction, ringbuffer: RingBufferId, ) -> Result<Option<RingBufferDef>>

Source

pub async fn find_ringbuffer_metadata( rx: &mut impl QueryTransaction, ringbuffer: RingBufferId, ) -> Result<Option<RingBufferMetadata>>

Source

pub async fn find_ringbuffer_by_name( rx: &mut impl QueryTransaction, namespace: NamespaceId, name: impl AsRef<str>, ) -> Result<Option<RingBufferDef>>

Source§

impl CatalogStore

Source

pub async fn get_ringbuffer( rx: &mut impl QueryTransaction, ringbuffer: RingBufferId, ) -> Result<RingBufferDef>

Source

pub async fn get_ringbuffer_metadata( rx: &mut impl QueryTransaction, ringbuffer: RingBufferId, ) -> Result<RingBufferMetadata>

Source§

impl CatalogStore

Source

pub async fn get_ringbuffer_pk_id( rx: &mut impl QueryTransaction, ringbuffer_id: RingBufferId, ) -> Result<Option<PrimaryKeyId>>

Get the primary key ID for a ring buffer Returns None if the ring buffer doesn’t exist or has no primary key

Source§

impl CatalogStore

Source§

impl CatalogStore

Source

pub async fn set_ringbuffer_primary_key( txn: &mut impl CommandTransaction, ringbuffer_id: RingBufferId, primary_key_id: PrimaryKeyId, ) -> Result<()>

Set the primary key ID for a ring buffer Returns an internal error if the ring buffer doesn’t exist

Source§

impl CatalogStore

Source

pub async fn update_ringbuffer_metadata( txn: &mut impl CommandTransaction, metadata: RingBufferMetadata, ) -> Result<()>

Source§

impl CatalogStore

Source

pub async fn find_sequence( rx: &mut impl QueryTransaction, sequence_id: SequenceId, ) -> Result<Option<Sequence>>

Source§

impl CatalogStore

Source

pub async fn get_sequence( rx: &mut impl QueryTransaction, sequence_id: SequenceId, ) -> Result<Sequence>

Source§

impl CatalogStore

Source

pub async fn list_sequences( rx: &mut impl QueryTransaction, ) -> Result<Vec<Sequence>>

Source§

impl CatalogStore

Source

pub async fn find_source( rx: &mut impl QueryTransaction, source: impl Into<SourceId>, ) -> Result<Option<SourceDef>>

Find a source (table, store::view, or virtual table) by its SourceId Returns None if the source doesn’t exist

Source§

impl CatalogStore

Source

pub async fn get_source( rx: &mut impl QueryTransaction, source: impl Into<SourceId>, ) -> Result<SourceDef>

Get a source (table or view) by its SourceId Returns an error if the source doesn’t exist

Source§

impl CatalogStore

Source

pub async fn create_table( txn: &mut impl CommandTransaction, to_create: TableToCreate, ) -> Result<TableDef>

Source§

impl CatalogStore

Source

pub async fn find_table( rx: &mut impl QueryTransaction, table: TableId, ) -> Result<Option<TableDef>>

Source

pub async fn find_table_by_name( rx: &mut impl QueryTransaction, namespace: NamespaceId, name: impl AsRef<str>, ) -> Result<Option<TableDef>>

Source§

impl CatalogStore

Source

pub async fn get_table( rx: &mut impl QueryTransaction, table: TableId, ) -> Result<TableDef>

Source§

impl CatalogStore

Source

pub async fn get_table_pk_id( rx: &mut impl QueryTransaction, table_id: TableId, ) -> Result<Option<PrimaryKeyId>>

Get the primary key ID for a table Returns None if the table doesn’t exist or has no primary key

Source§

impl CatalogStore

Source

pub async fn list_tables_all( rx: &mut impl QueryTransaction, ) -> Result<Vec<TableDef>>

Source§

impl CatalogStore

Source

pub async fn set_table_primary_key( txn: &mut impl CommandTransaction, table_id: TableId, primary_key_id: PrimaryKeyId, ) -> Result<()>

Set the primary key ID for a table Returns an internal error if the table doesn’t exist

Source§

impl CatalogStore

Source

pub async fn create_deferred_view( txn: &mut impl CommandTransaction, to_create: ViewToCreate, ) -> Result<ViewDef>

Source

pub async fn create_transactional_view( txn: &mut impl CommandTransaction, to_create: ViewToCreate, ) -> Result<ViewDef>

Source§

impl CatalogStore

Source

pub async fn find_view( rx: &mut impl QueryTransaction, id: ViewId, ) -> Result<Option<ViewDef>>

Source

pub async fn find_view_by_name( rx: &mut impl QueryTransaction, namespace: NamespaceId, name: impl AsRef<str>, ) -> Result<Option<ViewDef>>

Source§

impl CatalogStore

Source

pub async fn get_view( rx: &mut impl QueryTransaction, view: ViewId, ) -> Result<ViewDef>

Source§

impl CatalogStore

Source

pub async fn get_view_pk_id( rx: &mut impl QueryTransaction, view_id: ViewId, ) -> Result<Option<PrimaryKeyId>>

Get the primary key ID for a view Returns None if the view doesn’t exist or has no primary key

Source§

impl CatalogStore

Source

pub async fn list_views_all( rx: &mut impl QueryTransaction, ) -> Result<Vec<ViewDef>>

Source§

impl CatalogStore

Source

pub async fn set_view_primary_key( txn: &mut impl CommandTransaction, view_id: ViewId, primary_key_id: PrimaryKeyId, ) -> Result<()>

Set the primary key ID for a view Returns an internal error if the view doesn’t exist

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> 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<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