Created
May 4, 2018 17:32
-
-
Save ckhrysze/4b7cbec6cb332176d95aadaaa4ec6d58 to your computer and use it in GitHub Desktop.
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
sql = "select * from example as ex cross join jsonb_each(ex.data) as dt where value->>'ref' = 'ref_1';" | |
result = JsonbTest.Repo.query!(sql) | |
Enum.map(result.rows, &JsonbTest.Repo.load(Example, {result.columns, &1})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment