tink_sql icon indicating copy to clipboard operation
tink_sql copied to clipboard

Geometry types broken (becomes a Bytes instance) in CallProcedure

Open kevinresol opened this issue 5 years ago • 2 comments

Basically because typeCast now passes GEOMETRY as raw bytes,

https://github.com/haxetink/tink_sql/blob/f1434ff6e16d6381cdce14ecc7356649f3f8cd84/src/tink/sql/drivers/node/MySql.hx#L138

and CallProcedure carries no runtime type info. So when it arrives ResultParser, the Bytes will be passed through as is:

https://github.com/haxetink/tink_sql/blob/f1434ff6e16d6381cdce14ecc7356649f3f8cd84/src/tink/sql/parse/ResultParser.hx#L55

kevinresol avatar May 12 '20 12:05 kevinresol

Pushed a bandaid fix. It sucks. But I need it quick for now. Sorry about that.

kevinresol avatar May 12 '20 12:05 kevinresol

Btw I guess we can move parseGeometryValue into the geojson library

kevinresol avatar May 12 '20 12:05 kevinresol