haxetink / tink_sql

SQL embedded into Haxe
MIT License
53 stars 17 forks source link

Geometry types broken (becomes a Bytes instance) in CallProcedure #107

Open kevinresol opened 4 years ago

kevinresol commented 4 years ago

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 commented 4 years ago

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

kevinresol commented 4 years ago

Btw I guess we can move parseGeometryValue into the geojson library