RuntimeStorageNamespace

Trait RuntimeStorageNamespace 

Source
pub trait RuntimeStorageNamespace:
    Send
    + Sync
    + 'static {
Show 13 methods // Required methods fn namespace_id(&self) -> &RuntimeNamespaceId; fn context(&self) -> Arc<RuntimeContext<BoxedPager>>; fn create_table( &self, plan: CreateTablePlan, ) -> Result<RuntimeStatementResult<BoxedPager>>; fn drop_table(&self, plan: DropTablePlan) -> Result<()>; fn rename_table(&self, plan: RenameTablePlan) -> Result<()>; fn alter_table( &self, plan: AlterTablePlan, ) -> Result<RuntimeStatementResult<BoxedPager>>; fn create_index( &self, plan: CreateIndexPlan, ) -> Result<RuntimeStatementResult<BoxedPager>>; fn drop_index( &self, plan: DropIndexPlan, ) -> Result<Option<SingleColumnIndexDescriptor>>; fn create_view(&self, plan: CreateViewPlan) -> Result<()>; fn drop_view(&self, plan: DropViewPlan) -> Result<()>; fn lookup_table( &self, canonical: &str, ) -> Result<Arc<ExecutorTable<BoxedPager>>>; fn list_tables(&self) -> Vec<String>; // Provided method fn execute_operation( &self, operation: PlanOperation, ) -> Result<TransactionResult<BoxedPager>> { ... }
}
Expand description

Runtime-level namespace abstraction.

Implementors wrap a RuntimeContext for a specific routing domain (e.g. persistent tables, temporary tables). The namespace knows how to forward DDL/DML plan execution into the underlying context, but it does not perform storage allocation or manage physical pagers on its own.

Required Methods§

Source

fn namespace_id(&self) -> &RuntimeNamespaceId

Identifier used when resolving schemas (e.g. “main”, “temp”).

Source

fn context(&self) -> Arc<RuntimeContext<BoxedPager>>

Returns the runtime context bound to this namespace.

Source

fn create_table( &self, plan: CreateTablePlan, ) -> Result<RuntimeStatementResult<BoxedPager>>

Create a table inside this namespace.

Source

fn drop_table(&self, plan: DropTablePlan) -> Result<()>

Drop a table from this namespace by forwarding the planned request.

Source

fn rename_table(&self, plan: RenameTablePlan) -> Result<()>

Rename a table within this namespace.

Source

fn alter_table( &self, plan: AlterTablePlan, ) -> Result<RuntimeStatementResult<BoxedPager>>

Alter a table within this namespace.

Source

fn create_index( &self, plan: CreateIndexPlan, ) -> Result<RuntimeStatementResult<BoxedPager>>

Create an index within this namespace.

Source

fn drop_index( &self, plan: DropIndexPlan, ) -> Result<Option<SingleColumnIndexDescriptor>>

Drop an index from this namespace by forwarding the request.

Source

fn create_view(&self, plan: CreateViewPlan) -> Result<()>

Create a view inside this namespace.

Source

fn drop_view(&self, plan: DropViewPlan) -> Result<()>

Drop a view from this namespace by forwarding the planned request.

Source

fn lookup_table( &self, canonical: &str, ) -> Result<Arc<ExecutorTable<BoxedPager>>>

Lookup a table by canonical name.

Source

fn list_tables(&self) -> Vec<String>

List tables visible to this namespace.

Provided Methods§

Source

fn execute_operation( &self, operation: PlanOperation, ) -> Result<TransactionResult<BoxedPager>>

Execute a generic plan operation. Namespaces that do not yet support this entry point should override this method.

Implementors§