pub trait Model {
Show 23 methods
// Required methods
fn title(&mut self) -> &'static str;
fn table(&mut self) -> &'static str;
fn fields(&mut self) -> JsonValue;
fn action(&mut self, name: &str) -> Box<dyn Action>;
// Provided methods
fn version(&mut self) -> &'static str { ... }
fn name(&mut self) -> &'static str { ... }
fn describe(&mut self) -> &'static str { ... }
fn unique(&mut self) -> Vec<&'static str> { ... }
fn index(&mut self) -> Vec<Vec<&'static str>> { ... }
fn primary_key(&mut self) -> &'static str { ... }
fn partition(&mut self) -> bool { ... }
fn partition_columns(&mut self) -> JsonValue { ... }
fn init_data(&mut self) { ... }
fn table_fields(&mut self) -> JsonValue { ... }
fn tools(&mut self) -> Tools { ... }
fn table_tree_fields(&mut self) -> JsonValue { ... }
fn columns(&mut self, fields: Vec<&str>) -> JsonValue { ... }
fn query_fields(&mut self, fields: Vec<&str>) -> JsonValue { ... }
fn filter_title(&mut self, fields: Vec<&str>) -> String { ... }
fn btn_data(
&mut self,
title: &str,
action: Box<dyn Action>,
mode: BtnMode,
color: BtnColor,
match_condition: Vec<Vec<&str>>,
) -> JsonValue { ... }
fn table_select_fields(&mut self) -> JsonValue { ... }
fn dict_select_fields(&mut self) -> JsonValue { ... }
fn fields_name_list(&mut self, filter: Vec<&str>) -> Vec<String> { ... }
}Expand description
模型
Required Methods§
Provided Methods§
Sourcefn primary_key(&mut self) -> &'static str
fn primary_key(&mut self) -> &'static str
主键
Sourcefn partition_columns(&mut self) -> JsonValue
fn partition_columns(&mut self) -> JsonValue
分区配置 *列名 *分区key *实例 array![str, array![range1, range2, range3…]] *如果在已有分区的情况下想要修改分区的参照列,先要将当前分区代码删除后刷库,然后写新的分区规则再刷库
Sourcefn table_fields(&mut self) -> JsonValue
fn table_fields(&mut self) -> JsonValue
前端搜索字段
Sourcefn table_tree_fields(&mut self) -> JsonValue
fn table_tree_fields(&mut self) -> JsonValue
前端-树型-搜索字段
Sourcefn query_fields(&mut self, fields: Vec<&str>) -> JsonValue
fn query_fields(&mut self, fields: Vec<&str>) -> JsonValue
前端-高级查询条件字段
Sourcefn filter_title(&mut self, fields: Vec<&str>) -> String
fn filter_title(&mut self, fields: Vec<&str>) -> String
前端-模糊查询标题
Sourcefn btn_data(
&mut self,
title: &str,
action: Box<dyn Action>,
mode: BtnMode,
color: BtnColor,
match_condition: Vec<Vec<&str>>,
) -> JsonValue
fn btn_data( &mut self, title: &str, action: Box<dyn Action>, mode: BtnMode, color: BtnColor, match_condition: Vec<Vec<&str>>, ) -> JsonValue
前端-按钮数据
Sourcefn table_select_fields(&mut self) -> JsonValue
fn table_select_fields(&mut self) -> JsonValue
前端 关联搜索字段
Sourcefn dict_select_fields(&mut self) -> JsonValue
fn dict_select_fields(&mut self) -> JsonValue
前端 关联字典搜索字段