notum-cz / strapi-plugin-location

This plugin allows users to create location inputs and store latitude and longitude values as geometry types in a PostGIS database. It also provides functionality to filter items based on their location.
MIT License
24 stars 13 forks source link

perf: improve update query to populate geometry point field #68

Closed tiaxter closed 11 months ago

tiaxter commented 11 months ago

I noticed that the previous logic used to insert geometry point was not so performant and it generated lot of update request to Postgres DB. So I rewrited the code using only the Postgres method to improve query performance

omikulcik commented 11 months ago

Hi, @tiaxter, there is a conflict with your previous PR. I guess this one is more important and the check of JSON is not needed anymore. Is that right?

tiaxter commented 11 months ago

Hi, @omikulcik as you said with this query there's no need to check if returned data is JSON

omikulcik commented 11 months ago

@tiaxter I have merged it and it will be relased in a new version. Thank you for contributing ! :)