Fork me on GitHub
Aviv Kotek21:08:25

hi, using honey.sql couldn't realize how to use IF function with vanilla helpers (I understand how to call fn's) "IF( is NULL, 0, 1))" I eventually did something like this:

(-> (select [[:sum [[:raw "IF( is null, 0, 1))"]]]])
    (from :table)
how could you achieve this without using :raw ? ty!


@aviv There's a dedicated #honeysql FYI but that's like any other function call [:if [:= nil] 0 1]

👍 2
Aviv Kotek21:08:16

using the REPL mostly and looking on the tests, i'll check this out, thx