forked from transact-rs/sqlx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.rs
More file actions
50 lines (43 loc) · 1.03 KB
/
Copy pathdatabase.rs
File metadata and controls
50 lines (43 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
use crate::{PgConnection, PgTypeId, PgTypeInfo};
use sqlx_core::database::{Database, HasStatementCache, HasTypeId};
/// PostgreSQL database driver.
#[derive(Debug)]
pub struct Postgres;
impl Database for Postgres {
type Connection = PgConnection;
// type TransactionManager = PgTransactionManager;
//
// type Row = PgRow;
//
// type Done = PgDone;
//
// type Column = PgColumn;
//
type TypeInfo = PgTypeInfo;
//
// type Value = PgValue;
}
impl<'a> HasTypeId<'a> for Postgres {
type Database = Postgres;
type TypeId = PgTypeId<'a>;
}
// impl<'r> HasValueRef<'r> for Postgres {
// type Database = Postgres;
//
// type ValueRef = PgValueRef<'r>;
// }
//
// impl HasArguments<'_> for Postgres {
// type Database = Postgres;
//
// type Arguments = PgArguments;
//
// type ArgumentBuffer = PgArgumentBuffer;
// }
//
// impl<'q> HasStatement<'q> for Postgres {
// type Database = Postgres;
//
// type Statement = PgStatement<'q>;
// }
impl HasStatementCache for Postgres {}