Search code examples
squeryl

Squeryl order by multiple columns


I need to order by 2 fields:

SELECT * FROM item ORDER BY date ASC, sequence DESC;

Is it possible to emulate this SQL with Squeryl?


Solution

  • You can order by multiple fields. Just add them to the orderByclause as below:

     from(table)(t => select(t) orderBy(t.date, t.sequence desc)