Skip to content

Instantly share code, notes, and snippets.

@DanielBlanco
Created December 29, 2017 17:57
Show Gist options
  • Save DanielBlanco/57440eb2cd4bc5ec8db11c647ab3860c to your computer and use it in GitHub Desktop.
Save DanielBlanco/57440eb2cd4bc5ec8db11c647ab3860c to your computer and use it in GitHub Desktop.
How to output Ecto's generated SQL to console.
{sql, _} = Repo.to_sql(:all, query)
IO.puts sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment