pub trait Mode {
Show 35 methods
// Required methods
fn table_create(&mut self, data: Table) -> bool;
fn table_update(&mut self, data: Table) -> bool;
fn table_info(&mut self, table: &str) -> JsonValue;
fn table_is_exist(&mut self, name: &str) -> bool;
fn table(&mut self, name: &str) -> &mut Self;
fn autoinc(&mut self) -> &mut Self;
fn fetch_sql(&mut self) -> &mut Self;
fn order(&mut self, field: &str, by: bool) -> &mut Self;
fn group(&mut self, field: &str) -> &mut Self;
fn distinct(&mut self) -> &mut Self;
fn json(&mut self, field: &str) -> &mut Self;
fn column(&mut self, field: &str) -> JsonValue;
fn where_and(
&mut self,
field: &str,
compare: &str,
value: JsonValue
) -> &mut Self;
fn where_or(
&mut self,
field: &str,
compare: &str,
value: JsonValue
) -> &mut Self;
fn where_column(
&mut self,
field_a: &str,
compare: &str,
field_b: &str
) -> &mut Self;
fn count(&mut self) -> JsonValue;
fn max(&mut self, field: &str) -> JsonValue;
fn min(&mut self, field: &str) -> JsonValue;
fn sum(&mut self, field: &str) -> JsonValue;
fn avg(&mut self, field: &str) -> JsonValue;
fn select(&mut self) -> JsonValue;
fn find(&mut self) -> JsonValue;
fn value(&mut self, field: &str) -> JsonValue;
fn insert(&mut self, data: JsonValue) -> JsonValue;
fn insert_all(&mut self, data: JsonValue) -> JsonValue;
fn page(&mut self, page: i32, limit: i32) -> &mut Self;
fn update(&mut self, data: JsonValue) -> JsonValue;
fn delete(&mut self) -> JsonValue;
fn field(&mut self, name: &str) -> &mut Self;
fn hidden(&mut self, name: &str) -> &mut Self;
fn pool(&mut self) -> Pool;
fn transaction(&mut self) -> bool;
fn commit(&mut self) -> bool;
fn rollback(&mut self) -> bool;
fn sql(&mut self, sql: String) -> JsonValue;
}
Required Methods§
fn table_create(&mut self, data: Table) -> bool
fn table_update(&mut self, data: Table) -> bool
fn table_info(&mut self, table: &str) -> JsonValue
fn table_is_exist(&mut self, name: &str) -> bool
fn where_or( &mut self, field: &str, compare: &str, value: JsonValue ) -> &mut Self
sourcefn insert_all(&mut self, data: JsonValue) -> JsonValue
fn insert_all(&mut self, data: JsonValue) -> JsonValue
批量添加
隐藏字段
sourcefn transaction(&mut self) -> bool
fn transaction(&mut self) -> bool
事务开始