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
35 lines (23 loc) 路 731 Bytes
/
Copy pathdatabase.rs
File metadata and controls
35 lines (23 loc) 路 731 Bytes
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
//! Types which represent various database drivers.
use crate::database::{Database, HasCursor, HasRawValue, HasRow};
use crate::postgres::row::PgValue;
/// **Postgres** database driver.
pub struct Postgres;
impl Database for Postgres {
type Connection = super::PgConnection;
type Arguments = super::PgArguments;
type TypeInfo = super::PgTypeInfo;
type TableId = u32;
type RawBuffer = Vec<u8>;
}
impl<'a> HasRow<'a> for Postgres {
type Database = Postgres;
type Row = super::PgRow<'a>;
}
impl<'s, 'q> HasCursor<'s, 'q> for Postgres {
type Database = Postgres;
type Cursor = super::PgCursor<'s, 'q>;
}
impl<'a> HasRawValue<'a> for Postgres {
type RawValue = Option<PgValue<'a>>;
}