sqlx_core_guts/postgres/
database.rs1use crate::database::{Database, HasArguments, HasStatement, HasStatementCache, HasValueRef};
2use crate::postgres::arguments::PgArgumentBuffer;
3use crate::postgres::value::{PgValue, PgValueRef};
4use crate::postgres::{
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
29impl<'r> HasValueRef<'r> for Postgres {
30 type Database = Postgres;
31
32 type ValueRef = PgValueRef<'r>;
33}
34
35impl HasArguments<'_> for Postgres {
36 type Database = Postgres;
37
38 type Arguments = PgArguments;
39
40 type ArgumentBuffer = PgArgumentBuffer;
41}
42
43impl<'q> HasStatement<'q> for Postgres {
44 type Database = Postgres;
45
46 type Statement = PgStatement<'q>;
47}
48
49impl HasStatementCache for Postgres {}