English | 简体中文

api-docs / org.ktorm.dsl / WhenContinuation

WhenContinuation

data class WhenContinuation<T : Any, R : Any> (source code)

Return type for WHEN function, call its extension function THEN to finish a SQL when clause.

Constructors

NameSummary

<init>

WhenContinuation(
    parent: CaseWhen<T, R>,
    condition: ColumnDeclaring<T>)

Return type for WHEN function, call its extension function THEN to finish a SQL when clause.

Properties

NameSummary

condition

val condition: ColumnDeclaring<T>

parent

val parent: CaseWhen<T, R>

Extension Functions

NameSummary

eq

infix fun <T : Any> T.eq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Equal operator, translated to = in SQL.

neq

infix fun <T : Any> T.neq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Not-equal operator, translated to <> in SQL.

notEq

infix fun <T : Any> T.notEq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Not-equal operator, translated to <> in SQL.

THEN

fun <T : Any, R : Any> WhenContinuation<T, Nothing>.THEN(
    result: ColumnDeclaring<R>
): CaseWhen<T, R>

fun <T : Any, R : Any> WhenContinuation<T, Nothing>.THEN(
    result: R,
    sqlType: SqlType<R> = SqlType.of() ?: error("Cannot detect the argument's SqlType, please specify manually.")
): CaseWhen<T, R>

fun <T : Any, R : Any> WhenContinuation<T, R>.THEN(
    result: ColumnDeclaring<R>
): CaseWhen<T, R>

fun <T : Any, R : Any> WhenContinuation<T, R>.THEN(
    result: R,
    sqlType: SqlType<R> = SqlType.of() ?: error("Cannot detect the argument's SqlType, please specify manually.")
): CaseWhen<T, R>

Finishes the current when clause with the given result.