title: Elixir Ecto query - preserving order of output
body: <p>I have a list of ids <code>["123", "321", "101"]</code></p>
  
  <p>And a query <code>segments = Repo.all(from(s in Segment, where: s.id in ^ids))</code></p>
  
  <p>The output of my matched segments is not in the same order as in the list. E.g. If this was an <code>Enum.map</code> then the order would be preserved. Is there a way I can do this, using just the one query, without having to do something like <code>Enum.each</code>?</p>