I am using DBIx::Class and I have got a ResultSet. I like to re-order the ResultSet. I like to check a particular column “City” against a fix list of values (“London”, “New York” “Tokyo”) If city is found in the list of values I like to move that result to the top group. If city is not found, I like to move that result to the bottom group in the ResultSet.
Share
ORDER BY expr might be what you’re looking for.
For example, here a table:
Here the special ordering:
Translating this into a ResultSet method: