CaseWhen

class CaseWhen<T>(val value: Expression<*>?)

Represents an SQL function that allows the comparison of value to chained conditional clauses.

If value is not provided, each chained conditional will be evaluated independently.

Constructors

Link copied to clipboard
constructor(value: Expression<*>?)

Properties

Link copied to clipboard

The boolean conditions to check and their resulting expressions if the condition is met.

Link copied to clipboard
val value: Expression<*>?

The value that is compared against every conditional expression.

Functions

Link copied to clipboard

Adds an expression that will be used as the function result if all cases evaluate to false.

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

Adds a conditional expression with a result if the expression evaluates to true.