Trait DatabaseInterface
Source pub trait DatabaseInterface {
// Required methods
fn connect(config: &HashMap<String, String>) -> (Self, bool)
where Self: Sized;
fn delete_db(config: &HashMap<String, String>)
where Self: Sized;
fn table_from_types(
&self,
table_name: String,
types: &HashMap<String, SQLType>,
);
fn process_api_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 mut Request<Body>,
table: &'life2 SqlTableSchema,
) -> Pin<Box<dyn Future<Output = Response<Body>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided method
fn create_tables_from_schemas(&self, schemas: Vec<&SqlTableSchema>) { ... }
}