/
germanubis
/
sqlx
ΠΠ±Π·ΠΎΡ
ΠΠΎΠΊΡΠΌΠ΅Π½ΡΠ°ΡΠΈΡ
ΠΠΎΠΉΡΠΈ
/
germanubis
/
sqlx
ΠΠΎΠ΄
ΠΠ°ΠΏΡΠΎΡΡ
0
ΠΠ°Π΄Π°ΡΠΈ
ΠΠΈΠΊΠΈ
ΠΠ°ΠΊΠ΅ΡΡ
0
Π Π΅Π»ΠΈΠ·Ρ
0
ΠΠ½Π°Π»ΠΈΡΠΈΠΊΠ°
ΠΠ΅Π·ΠΎΠΏΠ°ΡΠ½ΠΎΡΡΡ
v0.7.0
sqlx-postgres/src/database.rs
56 ΡΡΡΠΎΠΊ
1 KB
Austin Bonander
Break drivers out into separate crates, clean up some technical debt (#2039)
22 ΡΠ΅Π² 2023, 00:25
22 ΡΠ΅Π² 2023, 00:25
b5312c3
ΠΠΎΠ΄
ΠΠ²ΡΠΎΡΡΡΠ²ΠΎ
Π ΡΡΠΌ ΠΊΠΎΠ΄?
use crate::arguments::PgArgumentBuffer; use crate::value::{PgValue, PgValueRef}; use crate::{ PgArguments, PgColumn, PgConnection, PgQueryResult, PgRow, PgStatement, PgTransactionManager, PgTypeInfo, }; pub(crate) use sqlx_core::database::{ Database, HasArguments, HasStatement, HasStatementCache, HasValueRef, }; /// PostgreSQL database driver. #[derive(Debug)] pub struct Postgres; impl Database for Postgres { type Connection = PgConnection; type TransactionManager = PgTransactionManager; type Row = PgRow; type QueryResult = PgQueryResult; type Column = PgColumn; type TypeInfo = PgTypeInfo; type Value = PgValue; const NAME: &'static str = "PostgreSQL"; const URL_SCHEMES: &'static [&'static str] = &["postgres", "postgresql"]; } 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 {}