Ecto insert values select

So basically you want to insert into database the row if it does not exist just yet. What I would do is have unique index on iso_code column and then have upsert with Ecto that does nothin (or updates all).