DatabaseAdapter

Trait DatabaseAdapter 

Source
pub trait DatabaseAdapter {
    // Required methods
    fn infer_schema(&self) -> Result<TableSchema>;
    fn bulk_insert(&self, table: &str, data: Vec<Value>) -> Result<usize>;
    fn type_mapping(&self, rust_type: &str) -> String;
}
Expand description

数据库适配器 Trait

Required Methods§

Source

fn infer_schema(&self) -> Result<TableSchema>

自动推断表结构

Source

fn bulk_insert(&self, table: &str, data: Vec<Value>) -> Result<usize>

批量数据插入(支持事务回滚)

Source

fn type_mapping(&self, rust_type: &str) -> String

类型转换系统

Implementors§