fix: resolve PostgreSQL/MySQL/SQL Server NUMERIC/DECIMAL display issues

- Add rust_decimal feature to sqlx and tiberius for proper Decimal type handling
- Fix try_get_unchecked<String> causing NULL or garbled output for numeric types
- Add numeric_precision and numeric_scale to ColumnInfo for all database drivers
- Update frontend to display precision (e.g., numeric(20,6)) in column headers
- Fix typeColorClass to handle type names with precision suffix

Root cause: PostgreSQL binary protocol sends NUMERIC as PgNumeric binary format,
not UTF-8 text. try_get_unchecked<String> attempted to decode binary bytes as UTF-8,
causing decode failures (NULL) or garbage characters (乱码).
This commit is contained in:
kingcanfish committed 2026-05-02 10:14:01 +08:00
1 parent 76dfe9935d
commit d1075c0042
13 files changed
+62 -20

No files matched your search

+2
View File
@@ -439,6 +439,8 @@ async fn get_columns_for_transfer(
is_primary_key: false,
extra: None,
comment: None,
numeric_precision: None,
numeric_scale: None,
})
}).map_err(|e| e.to_string())?;
Ok(rows.filter_map(|r| r.ok()).collect())