Last active
August 11, 2020 09:48
-
-
Save aleksb86/538f19c2ec0518420d515f829efca8cf to your computer and use it in GitHub Desktop.
Quering with Active Record json fields (PostgreSQL)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Orchestrator::Models::Order.where("params ->> 'parent_order_id' = :id", id: '2403') | |
VmOrder.where("params -> 'os' ? :os", os: 'RHEL 7.6 x64').first |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment