sql

All things SQL and JDBC...
murtaza52 2020-11-11T09:50:37.315400Z

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 ?

seancorfield 2020-11-11T17:20:29.315600Z

@murtaza52

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