https://kotlinlang.org logo
#exposed
Title
# exposed
a

Agustin Magne

02/19/2022, 12:11 PM
Hey. I'm trying to do
query.orderBy(column)
This column is a string column, and I want the
orderBy
statement NOT to be case sensitive. How can I achieve that? (without changing the column altogether to
.lowercase()
b

Bogdan

02/19/2022, 3:05 PM
https://stackoverflow.com/questions/2413427/how-to-use-sql-order-by-statement-to-sort-results-case-insensitive/2413833 alas, that's just the way it is. I did not find a ready-made collate operator, but you can write it
Copy code
MyTable.selectAll()
   .orderBy(MyTable.name.lowerCase())
🙌 1
a

Agustin Magne

02/19/2022, 3:25 PM
You're correct. That's the way to do it! Thank you 😄
33 Views