Git Product home page Git Product logo

Comments (10)

holtkamp avatar holtkamp commented on July 30, 2024 2

If process knows which version is running, it can adapt function and prevent users from breaking.

Note that MySQL 5.7 also is aware of the ST_ prefixed functions...

from doctrine2-spatial.

mareksuscak avatar mareksuscak commented on July 30, 2024 1

I'm not sure that MySQL is aware for all ST_ prefixed functions. Did you? When I launch test on my repo, with my old MySQL 5.7 server version, test throws exceptions because ST_GeomFromText is unknown. And MySQL8.0 server version throws exception because GeomFromText is unknown.

DQL queries should respect the OGC Standard. So, now, DQL should use prefixed ST_ version. I think its a good strategy to target the OGC Standard with DQL. I already updated the Abstract Platform like in doctrine/dbal. Abstract platform detects the server version and now, the DQL are the same for Postgresql, Mysql5 and Mysql8, but the core of the doctrine spatial lib will create the SQL query with the function known by its server. It will be very easy to deploy solutions for MariaDB and Microsoft SQL Server.

According to the official documentation, ST_GeomFromText should be available in MySQL 5.7:
https://dev.mysql.com/doc/refman/5.7/en/gis-wkt-functions.html#function_st-geomfromtext

from doctrine2-spatial.

holtkamp avatar holtkamp commented on July 30, 2024

Guess a PR would be very welcome 🤓 right @djlambert ?

from doctrine2-spatial.

holtkamp avatar holtkamp commented on July 30, 2024

Related to #190

I think we should proceed, adopt the ST_ prefixed function and tag a new major / breaking release, so no one will get any suprises.

@djlambert still monitoring this library?

from doctrine2-spatial.

djlambert avatar djlambert commented on July 30, 2024

PRs are always welcomed. They should include tests to be merged.

from doctrine2-spatial.

holtkamp avatar holtkamp commented on July 30, 2024

@djlambert thanks for the response.

Regarding #196, not sure how this can be tested more explicitly: the current test-set already covers it... right? However the automated tests fail...

from doctrine2-spatial.

Alexandre-T avatar Alexandre-T commented on July 30, 2024

I'm searching a way to be compliant with MySQL5.7 and MySQL8.0. If process knows which version is running, it can adapt function and prevent users from breaking. I forked the project last week and I will push a big update tonight to avoid untested functions initially. But the updates which uses protected methods insteadof protected properties open a way to determinates the name of function depending the MySQL server version.

Perhaps, you could have a look on it.

from doctrine2-spatial.

Alexandre-T avatar Alexandre-T commented on July 30, 2024

I'm not sure that MySQL is aware for all ST_ prefixed functions. Did you? When I launch test on my repo, with my old MySQL 5.7 server version, test throws exceptions because ST_GeomFromText is unknown. And MySQL8.0 server version throws exception because GeomFromText is unknown.

DQL queries should respect the OGC Standard. So, now, DQL should use prefixed ST_ version. I think its a good strategy to target the OGC Standard with DQL. I already updated the Abstract Platform like in doctrine/dbal. Abstract platform detects the server version and now, the DQL are the same for Postgresql, Mysql5 and Mysql8, but the core of the doctrine spatial lib will create the SQL query with the function known by its server. It will be very easy to deploy solutions for MariaDB and Microsoft SQL Server.

from doctrine2-spatial.

holtkamp avatar holtkamp commented on July 30, 2024

I'm not sure that MySQL is aware for all ST_ prefixed functions. Did you? When I launch test on my repo, with my old MySQL 5.7 server version, test throws exceptions because ST_GeomFromText is unknown. And MySQL8.0 server version throws exception because GeomFromText is unknown.

Aah, no, was not sure as well, that makes it a good thing to have these tests in place 👍

Still on vacation, so this was a quick comment without further research, sorry 😄

Your suggested approach seems very flexible, thumbs up!

from doctrine2-spatial.

mcanepa avatar mcanepa commented on July 30, 2024

Please, release an update to solve this issue

from doctrine2-spatial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.