1use crate::{PostgresConnection, PostgresPrepared, PostgresSqlWriter, PostgresTransaction};
2use tank_core::{Driver, DriverTransactional};
3
4pub struct PostgresDriver {}
5
6impl PostgresDriver {
7 pub const fn new() -> Self {
8 Self {}
9 }
10}
11
12impl Driver for PostgresDriver {
13 type Connection = PostgresConnection;
14 type SqlWriter = PostgresSqlWriter;
15 type Prepared = PostgresPrepared;
16
17 const NAME: &'static str = "postgres";
18
19 fn sql_writer(&self) -> PostgresSqlWriter {
20 PostgresSqlWriter {}
21 }
22}
23
24impl DriverTransactional for PostgresDriver {
25 type Transaction<'c> = PostgresTransaction<'c>;
26}