api-docs / org.ktorm.support.mysql / IF
IF
fun <T : Any> IF(
condition: ColumnDeclaring<Boolean>,
then: ColumnDeclaring<T>,
otherwise: ColumnDeclaring<T>
): FunctionExpression<T>
(source code)inline fun <reified T : Any> IF(
condition: ColumnDeclaring<Boolean>,
then: T,
otherwise: T,
sqlType: SqlType<T> = SqlType.of() ?: error("Cannot detect the param's SqlType, please specify manually.")
): FunctionExpression<T>
(source code)MySQL if
function, translated to if(condition, then, otherwise)
.
Since
3.1.0