title: Ecto elixir query return
body: <p>I so have this query I'm running that looks like this:</p>
  
  <pre><code>defp get(demand, offset) do
    IO.puts "demand/offset: #{demand}/#{offset}"
    events = C3poRepo.all(
      from t in C3poEvent,
        where: t.completed == 0,
        order_by: [asc: t.id],
        limit: ^demand,
        offset: ^offset
    )
    IO.puts "number of events: #{length(events)}"
    events
  end
  </code></pre>
  
  <p>(sidenote: This is being run in a GenStage with 3 stages)</p>
  
  <p>examining the database shows that I've got 271K rows that should be pulled page at a time. Demand in this case is 1200, and the offset is 0. For the sake of testing I set the offset manually to 0 to just grab the next 1200 rows of completed = 0 rows.</p>
  
  <p>What I expect to see is:</p>
  
  <blockquote>
    <p>demand/offset: 1200/0<br>
    number of events: <strong>1200</strong></p>
  </blockquote>
  
  <p>What I'm seeing is:</p>
  
  <blockquote>
    <p>demand/offset: 1200/0<br> 
    number of events: <strong>20</strong></p>
  </blockquote>
  
  <p>Anyone have any ideas as to why I'm only getting 20 events back? Is this perhaps related to what events really is as opposed to what I'm thinking of as a list of the records?</p>