public interface Case
The SQL case statement.
This construct can be used to create expressions of the type
or of the type
CASE x WHEN 1 THEN 'one'
WHEN 2 THEN 'two'
ELSE 'three'
END
Instances of Case are created through the
CASE WHEN x < 1 THEN 'one'
WHEN x >= 2 THEN 'two'
ELSE 'three'
END
DSL.decode()
method
- Author:
- Lukas Eder
-
Method Summary
Modifier and TypeMethodDescription<V> @NotNull CaseValueStep<V>
This construct can be used to create expressions of the type<V> @NotNull CaseValueStep<V>
value(V value)
This construct can be used to create expressions of the type<T> @NotNull CaseConditionStep<T>
This construct can be used to create expressions of the type<T> @NotNull CaseConditionStep<T>
This construct can be used to create expressions of the type<T> @NotNull CaseConditionStep<T>
This construct can be used to create expressions of the type<T> @NotNull CaseConditionStep<T>
This construct can be used to create expressions of the type<T> @NotNull CaseConditionStep<T>
This construct can be used to create expressions of the type<T> @NotNull CaseConditionStep<T>
This construct can be used to create expressions of the type
-
Method Details
-
value
This construct can be used to create expressions of the typeCASE value WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE 'three' END
- Type Parameters:
V
- The generic value type parameter- Parameters:
value
- The value to do the case statement on- Returns:
- An intermediary step for case statement construction
-
value
This construct can be used to create expressions of the typeCASE value WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE 'three' END
- Type Parameters:
V
- The generic value type parameter- Parameters:
value
- The value to do the case statement on- Returns:
- An intermediary step for case statement construction
-
when
This construct can be used to create expressions of the typeCASE WHEN x < 1 THEN 'one' WHEN x >= 2 THEN 'two' ELSE 'three' END
- Type Parameters:
T
- The generic field type parameter- Parameters:
condition
- A condition to check in the case statementresult
- The result if the condition holds true- Returns:
- An intermediary step for case statement construction
-
when
This construct can be used to create expressions of the typeCASE WHEN x < 1 THEN 'one' WHEN x >= 2 THEN 'two' ELSE 'three' END
- Type Parameters:
T
- The generic field type parameter- Parameters:
condition
- A condition to check in the case statementresult
- The result if the condition holds true- Returns:
- An intermediary step for case statement construction
-
when
@NotNull @Support <T> @NotNull CaseConditionStep<T> when(Condition condition, Select<? extends Record1<T>> result)This construct can be used to create expressions of the typeCASE WHEN x < 1 THEN 'one' WHEN x >= 2 THEN 'two' ELSE 'three' END
- Type Parameters:
T
- The generic field type parameter- Parameters:
condition
- A condition to check in the case statementresult
- The result if the condition holds true- Returns:
- An intermediary step for case statement construction
-
when
This construct can be used to create expressions of the typeCASE WHEN x < 1 THEN 'one' WHEN x >= 2 THEN 'two' ELSE 'three' END
- Type Parameters:
T
- The generic field type parameter- Parameters:
condition
- A condition to check in the case statementresult
- The result if the condition holds true- Returns:
- An intermediary step for case statement construction
-
when
@NotNull @Support <T> @NotNull CaseConditionStep<T> when(Field<Boolean> condition, Field<T> result)This construct can be used to create expressions of the typeCASE WHEN x < 1 THEN 'one' WHEN x >= 2 THEN 'two' ELSE 'three' END
- Type Parameters:
T
- The generic field type parameter- Parameters:
condition
- A condition to check in the case statementresult
- The result if the condition holds true- Returns:
- An intermediary step for case statement construction
-
when
@NotNull @Support <T> @NotNull CaseConditionStep<T> when(Field<Boolean> condition, Select<? extends Record1<T>> result)This construct can be used to create expressions of the typeCASE WHEN x < 1 THEN 'one' WHEN x >= 2 THEN 'two' ELSE 'three' END
- Type Parameters:
T
- The generic field type parameter- Parameters:
condition
- A condition to check in the case statementresult
- The result if the condition holds true- Returns:
- An intermediary step for case statement construction
-