Fork me on GitHub
#sql
<
2020-11-11
>
murtaza5209:11:37

the following (sql/format {:select [:*] :order-by [:title]}) -> ["SELECT * ORDER BY \"title\""] I want to do a case insensitive sort (using postresql with next.jdbc), one option is lower (column_name) , how do I specify that using the honeysql map ?

seancorfield17:11:29

@murtaza52

user=> (sql/format {:select [:*] :order-by [(sql/call :lower :title)]} :quoting :ansi)
["SELECT * ORDER BY lower(\"title\")"]
user=>