BaseController

Trait BaseController 

Source
pub trait BaseController:
    Send
    + Sync
    + 'static {
    // Required methods
    fn option(&self) -> &ControllerOption;
    fn table_name(&self) -> &str;
    fn db(&self) -> &DatabaseConnection;
}
Expand description

控制器基类 trait

提供通用的 CRUD 接口处理

Required Methods§

Source

fn option(&self) -> &ControllerOption

获取控制器配置

Source

fn table_name(&self) -> &str

获取表名

Source

fn db(&self) -> &DatabaseConnection

获取数据库连接

Implementors§