Raw SQL with Ecto
<p>I'm very new in the world of Elixir and Phoenix Framework. I'm trying to follow TheFireHoseProject tutorial, but having problems with querying raw SQL with Ecto. The tutorial says this should work:</p>

<pre><code>defmodule Queries do
def random do
  query = Ecto.Adapters.Postgres.query(
    Repo,
    "SELECT id, saying, author from quotes ORDER BY RANDOM() LIMIT 1",
    [])
  %Postgrex.Result{rows: [row]} = query
  {id, saying, author} = row
  %Splurty.Quote{id: id, saying: saying, author: author}
end
end
</code></pre>

<p>I'm getting a runtime error that the Ecto.Adapters.Postgres.query doesn't exist (undefined function). </p>

<p>I tried to search the Ecto documentation and found that there might be a function called run_query, but it doesn't work either. </p>

<p>I think I'm using Ecto 1.1.4 and I didn't find any good (up-to-date) samples of how can I query raw SQL with Ecto. </p>

<p>The link to the firehoseproject is: <a href="http://phoenix.thefirehoseproject.com/" rel="noreferrer">http://phoenix.thefirehoseproject.com/</a></p>