sqlx_postgres/
database.rs1use crate::arguments::PgArgumentBuffer;
2use crate::value::{PgValue, PgValueRef};
3use crate::{
4 PgArguments, PgColumn, PgConnection, PgQueryResult, PgRow, PgStatement, PgTransactionManager,
5 PgTypeInfo,
6};
7
8pub(crate) use sqlx_core::database::{Database, HasStatementCache};
9
10#[derive(Debug)]
12pub struct Postgres;
13
14impl Database for Postgres {
15 type Connection = PgConnection;
16
17 type TransactionManager = PgTransactionManager;
18
19 type Row = PgRow;
20
21 type QueryResult = PgQueryResult;
22
23 type Column = PgColumn;
24
25 type TypeInfo = PgTypeInfo;
26
27 type Value = PgValue;
28 type ValueRef<'r> = PgValueRef<'r>;
29
30 type Arguments<'q> = PgArguments;
31 type ArgumentBuffer<'q> = PgArgumentBuffer;
32
33 type Statement<'q> = PgStatement<'q>;
34
35 const NAME: &'static str = "PostgreSQL";
36
37 const URL_SCHEMES: &'static [&'static str] = &["postgres", "postgresql"];
38}
39
40impl HasStatementCache for Postgres {}