pub trait OrmRepository {
// Required methods
fn find(&self) -> &str;
fn create(&self) -> &str;
fn update(&self) -> &str;
fn delete(&self) -> &str;
}
Expand description
This trait contains the methods that generate sql
Required Methods§
Sourcefn create(&self) -> &str
fn create(&self) -> &str
generate: INSERT INTO {table_name} ({struct_fields}) VALUES({$1,$2…}) RETURNING {struct_fields}