I have a list of ids ["123", "321", "101"]
And a query segments = Repo.all(from(s in Segment, where: s.id in ^ids))
The output of my matched segments is not in the same order as in the list. E.g. If this was an Enum.map
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 Enum.each
?