mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-22 18:14:11 +00:00
feat: Unify Debug implementations across PgRow, MySqlRow and SqliteRow (#3890)
* Introduce `debug_row` function * Use `debug_row` to implement `Debug` for `SqliteRow` * Use `debug_row` in `PgRow`'s `Debug` implementation * Match `MySqlRow`'s `Debug` implementation
This commit is contained in:
@@ -5,7 +5,7 @@ use std::sync::Arc;
|
||||
use sqlx_core::column::ColumnIndex;
|
||||
use sqlx_core::error::Error;
|
||||
use sqlx_core::ext::ustr::UStr;
|
||||
use sqlx_core::row::Row;
|
||||
use sqlx_core::row::{debug_row, Row};
|
||||
use sqlx_core::HashMap;
|
||||
|
||||
use crate::statement::StatementHandle;
|
||||
@@ -77,6 +77,12 @@ impl ColumnIndex<SqliteRow> for &'_ str {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for SqliteRow {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
debug_row(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
// #[cfg(feature = "any")]
|
||||
// impl From<SqliteRow> for crate::any::AnyRow {
|
||||
// #[inline]
|
||||
|
||||
Reference in New Issue
Block a user