You are viewing a single comment's thread from:

RE: EctoPgJson 0.1 release: Elixir/Ecto extension for Posgres JSON/JSONB operators

in #utopian-io6 years ago

Thank you for your contribution. How it is different than Ecto.Query.API, because someone can directly do fragment("?->>? ILIKE ?", p.map, "key_name", ^some_value) for JSON/JSONB?

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Sort:  

Thanks for the review, @codingdefined.

How it is different than Ecto.Query.API, because someone can directly do fragment("?->>? ILIKE ?", p.map, "key_name", ^some_value) for JSON/JSONB?

Yep, that's exactly the point of this library. I've noticed that my codebase is full of repeated fragments for JSONB handling so I've decided to dry it out and extract the functionality to a dedicated package.