ActiveRecordExtended
ActiveRecordExtended copied to clipboard
Question: Add exists_all/exists_any for jsonb/hstore columns
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 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 👍 .