I also commented on “Sort by multiple columns” thread, but I think combined sort with query is sometimes very complicated now.
One reason is that juxt
, (sort (.thenComparing c1 c2))
or other combination function cannot be used in query well (I don’t know detailed reason behind there, but not working in fact). And second reason is that (reversed) string compare within combined sort.
So it would be nice if there is multiplex sort function (for example, ConditionA ASC, ConditionB DESC, …etc) just like :where
.
(If already there is, please tell me the right way. And maybe this will be improved in db version using SQL…?)