risingwave_frontend::catalog::catalog_service

Trait CatalogWriter

source
pub trait CatalogWriter: Send + Sync {
Show 32 methods // Required methods fn create_database<'life0, 'life1, 'async_trait>( &'life0 self, db_name: &'life1 str, owner: u32, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create_schema<'life0, 'life1, 'async_trait>( &'life0 self, db_id: u32, schema_name: &'life1 str, owner: u32, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create_view<'life0, 'async_trait>( &'life0 self, view: PbView, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_materialized_view<'life0, 'async_trait>( &'life0 self, table: PbTable, graph: StreamFragmentGraph, dependencies: HashSet<ObjectId>, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_table<'life0, 'async_trait>( &'life0 self, source: Option<PbSource>, table: PbTable, graph: StreamFragmentGraph, job_type: PbTableJobType, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn replace_table<'life0, 'async_trait>( &'life0 self, source: Option<PbSource>, table: PbTable, graph: StreamFragmentGraph, mapping: ColIndexMapping, job_type: TableJobType, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_index<'life0, 'async_trait>( &'life0 self, index: PbIndex, table: PbTable, graph: StreamFragmentGraph, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_source<'life0, 'async_trait>( &'life0 self, source: PbSource, graph: Option<StreamFragmentGraph>, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_sink<'life0, 'async_trait>( &'life0 self, sink: PbSink, graph: StreamFragmentGraph, affected_table_change: Option<PbReplaceTablePlan>, dependencies: HashSet<ObjectId>, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_subscription<'life0, 'async_trait>( &'life0 self, subscription: PbSubscription, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_function<'life0, 'async_trait>( &'life0 self, function: PbFunction, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_connection<'life0, 'async_trait>( &'life0 self, connection_name: String, database_id: u32, schema_id: u32, owner_id: u32, connection: Payload, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_secret<'life0, 'async_trait>( &'life0 self, secret_name: String, database_id: u32, schema_id: u32, owner_id: u32, payload: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn comment_on<'life0, 'async_trait>( &'life0 self, comment: PbComment, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn drop_table<'life0, 'async_trait>( &'life0 self, source_id: Option<u32>, table_id: TableId, cascade: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn drop_materialized_view<'life0, 'async_trait>( &'life0 self, table_id: TableId, cascade: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn drop_view<'life0, 'async_trait>( &'life0 self, view_id: u32, cascade: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn drop_source<'life0, 'async_trait>( &'life0 self, source_id: u32, cascade: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn drop_sink<'life0, 'async_trait>( &'life0 self, sink_id: u32, cascade: bool, affected_table_change: Option<PbReplaceTablePlan>, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn drop_subscription<'life0, 'async_trait>( &'life0 self, subscription_id: u32, cascade: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn drop_database<'life0, 'async_trait>( &'life0 self, database_id: u32, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn drop_schema<'life0, 'async_trait>( &'life0 self, schema_id: u32, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn drop_index<'life0, 'async_trait>( &'life0 self, index_id: IndexId, cascade: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn drop_function<'life0, 'async_trait>( &'life0 self, function_id: FunctionId, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn drop_connection<'life0, 'async_trait>( &'life0 self, connection_id: u32, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn drop_secret<'life0, 'async_trait>( &'life0 self, secret_id: SecretId, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn alter_name<'life0, 'life1, 'async_trait>( &'life0 self, object_id: Object, object_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn alter_owner<'life0, 'async_trait>( &'life0 self, object: Object, owner_id: u32, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn alter_source<'life0, 'async_trait>( &'life0 self, source: PbSource, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn alter_parallelism<'life0, 'async_trait>( &'life0 self, table_id: u32, parallelism: PbTableParallelism, deferred: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn alter_set_schema<'life0, 'async_trait>( &'life0 self, object: Object, new_schema_id: u32, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn alter_swap_rename<'life0, 'async_trait>( &'life0 self, object: Object, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}
Expand description

CatalogWriter initiate DDL operations (create table/schema/database/function/connection). It will only send rpc to meta and get the catalog version as response. Then it will wait for the local catalog to be synced to the version, which is performed by observer.

Required Methods§

source

fn create_database<'life0, 'life1, 'async_trait>( &'life0 self, db_name: &'life1 str, owner: u32, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn create_schema<'life0, 'life1, 'async_trait>( &'life0 self, db_id: u32, schema_name: &'life1 str, owner: u32, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn create_view<'life0, 'async_trait>( &'life0 self, view: PbView, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn create_materialized_view<'life0, 'async_trait>( &'life0 self, table: PbTable, graph: StreamFragmentGraph, dependencies: HashSet<ObjectId>, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn create_table<'life0, 'async_trait>( &'life0 self, source: Option<PbSource>, table: PbTable, graph: StreamFragmentGraph, job_type: PbTableJobType, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn replace_table<'life0, 'async_trait>( &'life0 self, source: Option<PbSource>, table: PbTable, graph: StreamFragmentGraph, mapping: ColIndexMapping, job_type: TableJobType, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn create_index<'life0, 'async_trait>( &'life0 self, index: PbIndex, table: PbTable, graph: StreamFragmentGraph, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn create_source<'life0, 'async_trait>( &'life0 self, source: PbSource, graph: Option<StreamFragmentGraph>, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn create_sink<'life0, 'async_trait>( &'life0 self, sink: PbSink, graph: StreamFragmentGraph, affected_table_change: Option<PbReplaceTablePlan>, dependencies: HashSet<ObjectId>, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn create_subscription<'life0, 'async_trait>( &'life0 self, subscription: PbSubscription, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn create_function<'life0, 'async_trait>( &'life0 self, function: PbFunction, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn create_connection<'life0, 'async_trait>( &'life0 self, connection_name: String, database_id: u32, schema_id: u32, owner_id: u32, connection: Payload, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn create_secret<'life0, 'async_trait>( &'life0 self, secret_name: String, database_id: u32, schema_id: u32, owner_id: u32, payload: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn comment_on<'life0, 'async_trait>( &'life0 self, comment: PbComment, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn drop_table<'life0, 'async_trait>( &'life0 self, source_id: Option<u32>, table_id: TableId, cascade: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn drop_materialized_view<'life0, 'async_trait>( &'life0 self, table_id: TableId, cascade: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn drop_view<'life0, 'async_trait>( &'life0 self, view_id: u32, cascade: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn drop_source<'life0, 'async_trait>( &'life0 self, source_id: u32, cascade: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn drop_sink<'life0, 'async_trait>( &'life0 self, sink_id: u32, cascade: bool, affected_table_change: Option<PbReplaceTablePlan>, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn drop_subscription<'life0, 'async_trait>( &'life0 self, subscription_id: u32, cascade: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn drop_database<'life0, 'async_trait>( &'life0 self, database_id: u32, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn drop_schema<'life0, 'async_trait>( &'life0 self, schema_id: u32, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn drop_index<'life0, 'async_trait>( &'life0 self, index_id: IndexId, cascade: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn drop_function<'life0, 'async_trait>( &'life0 self, function_id: FunctionId, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn drop_connection<'life0, 'async_trait>( &'life0 self, connection_id: u32, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn drop_secret<'life0, 'async_trait>( &'life0 self, secret_id: SecretId, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn alter_name<'life0, 'life1, 'async_trait>( &'life0 self, object_id: Object, object_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn alter_owner<'life0, 'async_trait>( &'life0 self, object: Object, owner_id: u32, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn alter_source<'life0, 'async_trait>( &'life0 self, source: PbSource, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Replace the source in the catalog.

source

fn alter_parallelism<'life0, 'async_trait>( &'life0 self, table_id: u32, parallelism: PbTableParallelism, deferred: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn alter_set_schema<'life0, 'async_trait>( &'life0 self, object: Object, new_schema_id: u32, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn alter_swap_rename<'life0, 'async_trait>( &'life0 self, object: Object, ) -> Pin<Box<dyn Future<Output = Result<(), RwError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§