ValueCase

Builder class for creating value-based CASE expressions where a specific value is compared against different conditions.

Parameters

T

The type of the value being compared

value

The expression whose value will be compared in WHEN clauses

Constructors

Link copied to clipboard
constructor(value: ExpressionWithColumnType<T>)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun <R> When(cond: T, result: Expression<R>): ValueCaseWhen<T, R>

Adds a WHEN clause that compares the case value against a literal condition.

fun <R> When(cond: Expression<T>, result: Expression<R>): ValueCaseWhen<T, R>

Adds a WHEN clause that compares the case value against an expression condition.

fun <R> When(cond: T, result: R, resultType: IColumnType<R & Any>? = null): ValueCaseWhen<T, R>

Adds a WHEN clause that compares the case value against a literal condition with a literal result.

fun <R> When(cond: Expression<T>, result: R, resultType: IColumnType<R & Any>? = null): ValueCaseWhen<T, R>

Adds a WHEN clause that compares the case value against an expression condition with a literal result.