clickbar / laravel-magellan

A modern PostGIS toolbox for Laravel
MIT License
198 stars 11 forks source link

Remove DB hook to fix having sql in binding values #15

Closed saibotk closed 1 year ago

saibotk commented 1 year ago

We currently tried to convert bindings, that were geometries, to an SQL representation. This does not work, since bindings are passed as strings to the DB. Thus it cannot execute functions like ST_GeomFromEWKT in such a binding.

So to fix this issue we will for now remove our custom DB hook and let PHP bind our geometries as strings. So it will now implicitly use the string generator.

This method works for all generators and we might consider adding a custom stUpdate command in the future once we need more explicit control.