1use crate::{MySQLConnection, MySQLPrepared, MySQLSqlWriter, MySQLTransaction};
2use tank_core::Driver;
3
4#[derive(Clone, Copy, Default, Debug)]
6pub struct MySQLDriver;
7impl MySQLDriver {
8 pub const fn new() -> Self {
9 Self
10 }
11}
12
13pub type MariaDBDriver = MySQLDriver;
15
16impl Driver for MySQLDriver {
17 type Connection = MySQLConnection;
18 type SqlWriter = MySQLSqlWriter;
19 type Prepared = MySQLPrepared;
20 type Transaction<'c> = MySQLTransaction<'c>;
21
22 const NAME: &'static [&'static str] = &["mysql", "mariadb"];
23 fn sql_writer(&self) -> Self::SqlWriter {
24 MySQLSqlWriter::default()
25 }
26}