Merge pull request #3653 from dolthub/james/geometry

selecting geometry types now show up in hex form, rather than raw ASCII
This commit is contained in:
James Cor
2022-06-22 16:24:56 -07:00
committed by GitHub
@@ -313,25 +313,6 @@ func SqlColToStr(ctx context.Context, sqlType sql.Type, col interface{}) (string
} else {
return "false", nil
}
case sql.Point: //TODO: remove these when fixed in GMS
buf := make([]byte, 25)
WriteEWKBHeader(typedCol, buf)
WriteEWKBPointData(typedCol, buf[9:])
return string(buf), nil
case sql.LineString:
buf := make([]byte, 9+4+16*len(typedCol.Points))
WriteEWKBHeader(typedCol, buf)
WriteEWKBLineData(typedCol, buf[9:])
return string(buf), nil
case sql.Polygon:
size := 0
for _, l := range typedCol.Lines {
size += 4 + 16*len(l.Points)
}
buf := make([]byte, 9+4+size)
WriteEWKBHeader(typedCol, buf)
WriteEWKBPolyData(typedCol, buf[9:])
return string(buf), nil
default:
res, err := sqlType.SQL(nil, col)
if err != nil {