Giter Club home page Giter Club logo

Comments (9)

bryanjos avatar bryanjos commented on June 16, 2024

@Virviil I'm not sure either with the information given. It may be a configuration problem. Are the two queries run in the same mix environment? Is there a simpler query you could run that shows it working or not working?

from geo.

Virviil avatar Virviil commented on June 16, 2024

Yep, both queries in one session of mix phoenix.server

from geo.

Virviil avatar Virviil commented on June 16, 2024

I can provide you any information, just don't know which

from geo.

bryanjos avatar bryanjos commented on June 16, 2024

@Virviil is that the query the Ecto runs? If so could you show me your Ecto query if possible?

from geo.

Virviil avatar Virviil commented on June 16, 2024

No problem.

SELECT Request

Repo.all(
    from b in Bookmark,
    where: b.bookmark_type == "public",
    where: st_within(b.latlng, st_buffer(^point, ^radius, 8)),
    where: b.is_active == true and b.is_delete != true,
    order_by: [desc: b.updated_at],
    offset: ^offset,
    limit: ^limit,
    select: b
)

INSERT Request

Just populating changeset, one of the params is %Geo.Point{}, and then Repo.insert

from geo.

bryanjos avatar bryanjos commented on June 16, 2024

@Virviil sorry for the delayed response. I'm not sure what the issue is from looking at it. As far as I can tell from the SQL and from the Ecto query, it all looks correct. It may be a bug here, but not sure. Could also be something with Postgrex, but let's make sure first. What happens if you replace the called to st_within and st_buffer with fragments that call the underlying PostGIS functions?

from geo.

Virviil avatar Virviil commented on June 16, 2024

from geo.

bryanjos avatar bryanjos commented on June 16, 2024

Glad you were able to find a workaround. When I have some time I'll try to reproduce this and if I can I'll try to fix it.

from geo.

bryanjos avatar bryanjos commented on June 16, 2024

Going to close this since there was a workaround and nothing has came up since

from geo.

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.