geoalchemy / geoalchemy2

Geospatial extension to SQLAlchemy
http://geoalchemy-2.readthedocs.org
MIT License
634 stars 112 forks source link

Fix: Add MariaDB-specific reflection #522

Open tomkcook opened 1 month ago

tomkcook commented 1 month ago

Description

Fixes: #521

This resolves #521 -- at least for me -- by adding a MariaDB-specific query for geometry column reflection.

Apologies that I am out of time today to add a test case. I'll look into it tomorrow.

Checklist

This pull request is:

tomkcook commented 1 month ago

TBH I struggle a bit to articulate a test that would fail without this change and pass with it, at least within the current test regime. I can see two options:

Do the maintainers have a preference for which approach to take?

adrien-berchet commented 1 month ago

Hi @tomkcook, Sorry for the delay, I'm currently on vacation. Thank you very much for pointing this issue out and for proposing a solution. As far as I can see, your solution looks good but it could be reworked to be a bit more compact and to avoid duplicated code. And for your question, I think that just one test for reflect_geometry_column is enough. I will have some time next week to review this more carefully.