pub trait DdlExecutor {
// Required methods
fn create_table(
&mut self,
name: &str,
fields: &[(&str, DataType)],
primary_key: Option<usize>,
) -> Result<()>;
fn create_index(
&mut self,
table_name: &str,
field_name: &str,
index_type: IndexType,
) -> Result<()>;
}Expand description
DDL执行器trait,定义创建表和索引的方法
Required Methods§
Implementors§
impl DdlExecutor for RemDb
为RemDb实现DdlExecutor trait