haxetink / tink_sql

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

Spatial #112

Closed kevinresol closed 3 years ago

kevinresol commented 4 years ago

This is breaking but I suspect I am the only one using spatial types (because the spatial-related api are so incomplete yet no one complains)

benmerckx commented 3 years ago

Running the tests again it seems that latitude and longitude are switched around: image

Writing the initial parser I remember parsing y first, then x. Even though I did not see that behaviour in the mysql driver. https://github.com/haxetink/tink_sql/blob/af3d0e838174b9ade58bfc82a0183546ce95f6c1/src/tink/sql/parse/ResultParser.hx#L22

Looking back I did so to pass the test suite. But the test suite was actually wrong :) Here's where that originated: https://github.com/haxetink/tink_sql/blob/3fb7f19d60f39653879d3f034399e01101b2ca72/src/tink/sql/drivers/node/MySql.hx#L165

I'll flip the expected coordinates.

kevinresol commented 3 years ago

Fixed 😉