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
use crate::cursor::HasCursor;
use crate::database::Database;
use crate::postgres::{
PgArguments, PgConnection, PgCursor, PgError, PgRawBuffer, PgRow, PgTypeInfo, PgValue,
};
use crate::row::HasRow;
use crate::value::HasRawValue;
#[derive(Debug)]
pub struct Postgres;
impl Database for Postgres {
type Connection = PgConnection;
type Arguments = PgArguments;
type TypeInfo = PgTypeInfo;
type TableId = u32;
type RawBuffer = PgRawBuffer;
type Error = PgError;
}
impl<'a> HasRow<'a> for Postgres {
type Database = Postgres;
type Row = PgRow<'a>;
}
impl<'s, 'q> HasCursor<'s, 'q> for Postgres {
type Database = Postgres;
type Cursor = PgCursor<'s, 'q>;
}
impl<'a> HasRawValue<'a> for Postgres {
type Database = Postgres;
type RawValue = PgValue<'a>;
}