Is there a way to use custom/varying column names in fragment? I mean the situation where I have 2 almost similar tables coming from different databases. Only couple of columns are different for historical reasons and I use those column names inside fragment(s). I want to unify Ecto queries to both of those tables as they were executed separately before.
Using simple questionmark notation fragment("?", column_name) causes column name to be appended into fragment however column ends up wrapped into double-quotes which is not desired.
The column I would like to choose depending on certain conditions (like DB/Repo is used) is departure_date. That column name is different in another database. As a side note this query basically orders records by closest date relative to datetime.