Open rainerborene opened 7 years ago
I'll be using this monkey patch until not having this feature implemented.
BabySqueel::Operators::Generic.module_eval do
def json(name)
op '->>', Arel::Nodes.build_quoted(name)
end
end
# now i can do this
Activity.selecting { data.json(:name).eq('xzy') }
Great idea, but, I'd rather have a separate package implement JSON types and simply integrate it here. That way, users who don't use BabySqueel could reap the benefits as well. Does that make sense?
@rzane what do you think about supporting
jsonb
selectors? https://www.postgresql.org/docs/9.4/static/functions-json.htmlSome ideias:
which translates to
Related discussions: https://github.com/rails/arel/issues/288