pub trait SqlTable: SqlMapper {
fn table_name(_: PhantomData<Self>) -> String;
fn schema_of(_: PhantomData<Self>) -> Vec<(String, String, FieldAttribute)>;
fn primary_key_columns(_: PhantomData<Self>) -> Vec<String>;
fn map_to_sql(self) -> Vec<(String, Self::ValueType)>;
fn constraint_primary_key_query(ty: PhantomData<Self>) -> String { ... }
fn create_index_query(
ty: PhantomData<Self>,
index_name: &'static str,
index_keys: Vec<&'static str>
) -> String { ... }
fn create_unique_index_query(
ty: PhantomData<Self>,
index_name: &'static str,
index_keys: Vec<&'static str>
) -> String { ... }
fn create_table_query(ty: PhantomData<Self>) -> String { ... }
fn insert_query_with_params(
self
) -> (String, Vec<(String, Self::ValueType)>) { ... }
fn update_query_with_params(
self
) -> (String, Vec<(String, Self::ValueType)>) { ... }
}