Add SQLx operation tracing (#5223)
* wip: vendor sqlx-tracing * (compiles) standardize pg types used * more standardization * general log message improvements * wip: improve sqlx-tracing architecture * unify sqlx::Executor type * wip: try fix sqlx tracing * wip: sqlx-tracing compiles * so close * it compiles * fix ci
This commit is contained in:
23
packages/sqlx-tracing/src/postgres.rs
Normal file
23
packages/sqlx-tracing/src/postgres.rs
Normal file
@@ -0,0 +1,23 @@
|
||||
impl crate::Database for sqlx::Postgres {
|
||||
const SYSTEM: &'static str = "postgresql";
|
||||
|
||||
type ConnectionRef<'a> = &'a mut sqlx::PgConnection;
|
||||
|
||||
fn cast_connection<'c>(
|
||||
conn: &'c mut <Self as sqlx::Database>::Connection,
|
||||
) -> Self::ConnectionRef<'c> {
|
||||
conn
|
||||
}
|
||||
|
||||
// fn cast_pool_connection<'c>(
|
||||
// conn: &'c mut PoolConnection<Self>,
|
||||
// ) -> Self::PoolConnection<'c> {
|
||||
// &mut conn.inner
|
||||
// }
|
||||
|
||||
// fn cast_raw_connection<'c>(
|
||||
// conn: &'c mut <Self as sqlx::Database>::Connection,
|
||||
// ) -> Self::RawConnection<'c> {
|
||||
// conn
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user