mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-01-01 14:21:06 +00:00
31 lines
595 B
Rust
31 lines
595 B
Rust
use sqlx_core::database::{HasOutput, HasRawValue};
|
|
use sqlx_core::Database;
|
|
|
|
use super::{PgColumn, PgOutput, PgQueryResult, PgRawValue, PgRow, PgTypeId, PgTypeInfo};
|
|
|
|
#[derive(Debug)]
|
|
pub struct Postgres;
|
|
|
|
impl Database for Postgres {
|
|
type Column = PgColumn;
|
|
|
|
type Row = PgRow;
|
|
|
|
type QueryResult = PgQueryResult;
|
|
|
|
type TypeInfo = PgTypeInfo;
|
|
|
|
type TypeId = PgTypeId;
|
|
}
|
|
|
|
// 'x: execution
|
|
impl<'x> HasOutput<'x> for Postgres {
|
|
type Output = PgOutput<'x>;
|
|
}
|
|
|
|
// 'r: row
|
|
impl<'r> HasRawValue<'r> for Postgres {
|
|
type Database = Self;
|
|
type RawValue = PgRawValue<'r>;
|
|
}
|