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
2026-05-02 10:14:01 +08:00
parent 76dfe9935d
commit d1075c0042
13 changed files with 62 additions and 20 deletions
+2
View File
@@ -41,6 +41,8 @@ export interface ColumnInfo {
is_primary_key: boolean;
extra: string | null;
comment?: string | null;
numeric_precision?: number | null;
numeric_scale?: number | null;
}
export interface IndexInfo {