-
public interface Case
The SQL case statement.This construct can be used to create expressions of the type
or of the typeCASE x WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE 'three' END
Instances of Case are created through theCASE WHEN x < 1 THEN 'one' WHEN x >= 2 THEN 'two' ELSE 'three' END
DSL.decode()
method- Author:
- Lukas Eder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> @NotNull CaseValueStep<V>
value(Field<V> value)
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>
when(Condition condition, Field<T> result)
This construct can be used to create expressions of the type<T> @NotNull CaseConditionStep<T>
when(Condition condition, Select<? extends Record1<T>> result)
This construct can be used to create expressions of the type<T> @NotNull CaseConditionStep<T>
when(Condition condition, T result)
This construct can be used to create expressions of the type<T> @NotNull CaseConditionStep<T>
when(Field<Boolean> condition, Field<T> result)
This construct can be used to create expressions of the type<T> @NotNull CaseConditionStep<T>
when(Field<Boolean> condition, Select<? extends Record1<T>> result)
This construct can be used to create expressions of the type<T> @NotNull CaseConditionStep<T>
when(Field<Boolean> condition, T result)
This construct can be used to create expressions of the type
-
-
-
Method Detail
-
value
@NotNull @Support <V> @NotNull CaseValueStep<V> value(V 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
@NotNull @Support <V> @NotNull CaseValueStep<V> value(Field<V> 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
@NotNull @Support <T> @NotNull CaseConditionStep<T> when(Condition condition, 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(Condition 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(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
@NotNull @Support <T> @NotNull CaseConditionStep<T> when(Field<Boolean> condition, 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, 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
-
-