mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-30 13:02:51 +00:00
36 lines
731 B
Rust
36 lines
731 B
Rust
//! 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>>;
|
|
}
|