/
germanubis
/
sqlx
ΠΠ±Π·ΠΎΡ
ΠΠΎΠΊΡΠΌΠ΅Π½ΡΠ°ΡΠΈΡ
ΠΠΎΠΉΡΠΈ
/
germanubis
/
sqlx
ΠΠΎΠ΄
ΠΠ°ΠΏΡΠΎΡΡ
0
ΠΠ°Π΄Π°ΡΠΈ
ΠΠΈΠΊΠΈ
ΠΠ°ΠΊΠ΅ΡΡ
0
Π Π΅Π»ΠΈΠ·Ρ
0
ΠΠ½Π°Π»ΠΈΡΠΈΠΊΠ°
ΠΠ΅Π·ΠΎΠΏΠ°ΡΠ½ΠΎΡΡΡ
v0.8.2
sqlx-postgres/src/database.rs
40 ΡΡΡΠΎΠΊ
957 B
nitn3lav
Generic Associated Types in Database, replacing HasValueRef, HasArguments, HasStatement (#2973)
14 ΠΌΠ°Ρ 2024, 22:35
ΠΠ΅ Π²Π΅ΡΠΈΡΠΈΡΠΈΡΠΎΠ²Π°Π½
14 ΠΌΠ°Ρ 2024, 22:35
9ba488c
ΠΠΎΠ΄
ΠΠ²ΡΠΎΡΡΡΠ²ΠΎ
Π ΡΡΠΌ ΠΊΠΎΠ΄?
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, HasStatementCache}; /// 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; type ValueRef<'r> = PgValueRef<'r>; type Arguments<'q> = PgArguments; type ArgumentBuffer<'q> = PgArgumentBuffer; type Statement<'q> = PgStatement<'q>; const NAME: &'static str = "PostgreSQL"; const URL_SCHEMES: &'static [&'static str] = &["postgres", "postgresql"]; } impl HasStatementCache for Postgres {}