1use cdbc::database::{Database, HasArguments, HasStatement, HasStatementCache, HasValueRef};
2use crate::arguments::PgArgumentBuffer;
3use crate::value::{PgValue, PgValueRef};
4use crate::{
5 PgArguments, PgColumn, PgConnection, PgQueryResult, PgRow, PgStatement, PgTransactionManager,
6 PgTypeInfo,
7};
8
9#[derive(Debug)]
11pub struct Postgres;
12
13impl Database for Postgres {
14 type Connection = PgConnection;
15
16 type TransactionManager = PgTransactionManager;
17
18 type Row = PgRow;
19
20 type QueryResult = PgQueryResult;
21
22 type Column = PgColumn;
23
24 type TypeInfo = PgTypeInfo;
25
26 type Value = PgValue;
27
28 fn holder() -> &'static str {
29 "$"
30 }
31}
32
33impl<'r> HasValueRef<'r> for Postgres {
34 type Database = Postgres;
35
36 type ValueRef = PgValueRef<'r>;
37}
38
39impl HasArguments<'_> for Postgres {
40 type Database = Postgres;
41
42 type Arguments = PgArguments;
43
44 type ArgumentBuffer = PgArgumentBuffer;
45}
46
47impl HasStatement for Postgres {
48 type Database = Postgres;
49
50 type Statement = PgStatement;
51}
52
53impl HasStatementCache for Postgres {}