English | 简体中文

api-docs / org.ktorm.support.sqlite / iif

iif

fun <T : Any> iif(
    condition: ColumnDeclaring<Boolean>,
    then: ColumnDeclaring<T>,
    otherwise: ColumnDeclaring<T>
): FunctionExpression<T>
(source code)

inline fun <reified T : Any> iif(
    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)

SQLite iif function, translated to iif(condition, then, otherwise).