Magik.PowerUpRepo.stream_query

You're seeing just the callback stream_query, go back to Magik.PowerUpRepo module for more information.
Link to this callback

stream_query(queryable, opts)

View Source

Specs

stream_query(queryable :: Ecto.Queryable.t(), opts :: keyword()) ::
  Enumerable.t()

Load query with given size and provide the result as a stream

Options

  • page_size: number of entry to load per batch

Example

from(p in Product, where: p.quantity > 10 )
|> Repo.stream_query(20)
|> Stream.map( & &1.name)
|> Enum.to_list