feat(sqlite): add SQLite type mapping and conversion functions

* Implement SQLiteToCanonicalTypes for type mapping
* Add ConvertSQLiteToCanonical and ConvertCanonicalToSQLite functions
* Update mapDataType to utilize new conversion logic
This commit is contained in:
2026-05-19 19:26:09 +02:00
parent 80fb49bc5e
commit cb735f0754
6 changed files with 430 additions and 147 deletions
+9 -1
View File
@@ -270,7 +270,15 @@ func (r *Reader) queryColumns(schemaName string) (map[string]map[string]*models.
}
if numPrecision != nil {
column.Precision = *numPrecision
// For integer and serial types, numeric_precision is a bit-width (32, 64, 16)
// not a user-visible column parameter. Only store precision for types where
// it represents actual decimal/scale precision (numeric, decimal, float).
switch column.Type {
case "integer", "bigint", "smallint", "serial", "bigserial", "smallserial":
// skip — bit-width, not a column parameter
default:
column.Precision = *numPrecision
}
}
if numScale != nil {