feat: add WKB to EWKB conversion with SRID handling and integrate into MSSQL transformation

This commit is contained in:
2026-04-07 10:05:45 -05:00
parent f305ddec0b
commit aea310a3dd
3 changed files with 102 additions and 1 deletions

View File

@@ -79,6 +79,10 @@ func transformRowsMssql(columns []ColumnType, in <-chan []UnknownRowValues, out
if b, ok := value.([]byte); ok {
rowValues[i] = mssqlUuidToBigEndian(b)
}
} else if col.SystemType() == "geometry" || col.SystemType() == "geography" {
if b, ok := value.([]byte); ok {
rowValues[i] = wkbToEwkbWithSrid(b, 4326)
}
}
}
}
@@ -90,7 +94,7 @@ func transformRowsMssql(columns []ColumnType, in <-chan []UnknownRowValues, out
func logSampleRow(job MigrationJob, columns []ColumnType, rowValues UnknownRowValues, tag string) {
log.Infof("[%s.%s] Sample row: (%s)", job.Schema, job.Table, tag)
for i, col := range columns {
log.Infof("%s: %v", col.Name(), rowValues[i])
log.Infof("%s (%T): %v", col.Name(), rowValues[i], rowValues[i])
}
}