I have a query that is being built by piping several
where functions together. At one point I need to add a where clause that, in SQL, should look like this:
... AND (col1,col2) IN ((val1, val2), (val1, val2), ...) ...
For context, the ((val1, val2)…) would be generated dynamically and guaranteed to be safe SQL. I’ve tried several approaches to building this (fragments, macros with fragments, `[t.col1, t.col2] IN ^values_list’) but keep hitting roadblocks. It looks like there is an “unsafe_fragment” function coming with Ecto 3.0 which would solve this issue.
Has anyone had success building out a query like this using Ecto?