ActiveRecordExtended icon indicating copy to clipboard operation
ActiveRecordExtended copied to clipboard

Question: Add exists_all/exists_any for jsonb/hstore columns

Open elcuervo opened this issue 2 years ago • 1 comments

Implements some other operations from https://www.postgresql.org/docs/9.4/functions-json.html#FUNCTIONS-JSONB-OP-TABLE

First of all thank you for your work on the gem. We use it extensively and it's fantastic.

From time to time I want to check if a jsonb column has a given set of keys (we use some of them to enable and disable features)

This is just an initial idea. The AREL build is far from elegant but I wanted to get your feedback about the concept.

My AREL-fu is not too strong so feel free to correct anything that looks weird.

elcuervo avatar Jun 17 '22 13:06 elcuervo

@elcuervo Hey sorry for the radio silence. I've been sitting on this for a while and wanted to first get out my autoloader changes before spearheading into new functionality. Now that it has been pushed out if you could realign your branch I can take a fresh look into this addition 👍 .

GeorgeKaraszi avatar Aug 25 '22 17:08 GeorgeKaraszi