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

BorzdeG

08/21/2018, 2:59 PM
Tell me how to write such a SQL query?
Copy code
SELECT IF(myTableColumn<2 OR myTableColumn>4, TRUE, FALSE) as myColumn FROM myTable;
t

tapac

08/24/2018, 12:43 PM
There is not
IF
support in Exposed atm, but you can use `case-when-else`:
Copy code
case().When(MyTable.column lt 2 or (MyTable.column gt 4), booleanLiteral(true)).Else(booleanLiteral(false))
👍 1
4 Views