pub trait Module {
Show 13 methods
// Required methods
fn title(&self) -> String;
fn action(&mut self, name: &str) -> Result<Box<dyn Action>, String>;
// Provided methods
fn name(&self) -> String { ... }
fn description(&self) -> String { ... }
fn icon(&self) -> String { ... }
fn table(&self) -> bool { ... }
fn table_name(&self) -> String { ... }
fn table_key(&mut self) -> String { ... }
fn table_unique(&self) -> Vec<String> { ... }
fn table_index(&mut self) -> Vec<Vec<String>> { ... }
fn table_partition(&mut self) -> bool { ... }
fn table_partition_columns(&mut self) -> JsonValue { ... }
fn fields(&mut self) -> JsonValue { ... }
}Expand description
模型配置
Required Methods§
Provided Methods§
Sourcefn description(&self) -> String
fn description(&self) -> String
描述
Sourcefn table_name(&self) -> String
fn table_name(&self) -> String
数据库表名称
Sourcefn table_unique(&self) -> Vec<String>
fn table_unique(&self) -> Vec<String>
唯一索引
Sourcefn table_index(&mut self) -> Vec<Vec<String>>
fn table_index(&mut self) -> Vec<Vec<String>>
查询索引
Sourcefn table_partition(&mut self) -> bool
fn table_partition(&mut self) -> bool
是否分区
Sourcefn table_partition_columns(&mut self) -> JsonValue
fn table_partition_columns(&mut self) -> JsonValue
分区配置 *列名 *分区key *实例 array![str, array![range1, range2, range3…]] *如果在已有分区的情况下想要修改分区的参照列,先要将当前分区代码删除后刷库,然后写新的分区规则再刷库