Top Description Methods
org.jooq

public Interface Case

Known Direct Implementers
org.jooq.impl.CaseImpl
Imports
org.jooq.impl.DSL, org.jetbrains.annotations.NotNull

The SQL case statement.

This construct can be used to create expressions of the type


CASE x WHEN 1 THEN 'one'
       WHEN 2 THEN 'two'
       ELSE        'three'
END
or of the type

CASE WHEN x < 1  THEN 'one'
     WHEN x >= 2 THEN 'two'
     ELSE            'three'
END
Instances of Case are created through the DSL#decode() method
Author
Lukas Eder

Method Summary

Modifier and TypeMethod and Description
public <
The generic value type parameter
V
>
@NotNull CaseValueStep<V>

Returns:

An intermediary step for case statement construction
value
(V
The value to do the case statement on
value
)

This construct can be used to create expressions of the type


CASE value WHEN 1 THEN 'one'
           WHEN 2 THEN 'two'
           ELSE        'three'
END
public <
The generic value type parameter
V
>
@NotNull CaseValueStep<V>

Returns:

An intermediary step for case statement construction
value
(Field<V>
The value to do the case statement on
value
)

Deprecated as a consequence of Field being deprecated.
This construct can be used to create expressions of the type

CASE value WHEN 1 THEN 'one'
           WHEN 2 THEN 'two'
           ELSE        'three'
END
public <
The generic field type parameter
T
>
@NotNull CaseConditionStep<T>

Returns:

An intermediary step for case statement construction
when
(Condition
A condition to check in the case statement
condition
,
T
The result if the condition holds true
result
)

Deprecated as a consequence of Condition and CaseConditionStep being deprecated.
This construct can be used to create expressions of the type

CASE WHEN x < 1  THEN 'one'
     WHEN x >= 2 THEN 'two'
     ELSE            'three'
END
public <
The generic field type parameter
T
>
@NotNull CaseConditionStep<T>

Returns:

An intermediary step for case statement construction
when
(Condition
A condition to check in the case statement
condition
,
Field<T>
The result if the condition holds true
result
)

Deprecated as a consequence of Condition, Field and CaseConditionStep being deprecated.
This construct can be used to create expressions of the type

CASE WHEN x < 1  THEN 'one'
     WHEN x >= 2 THEN 'two'
     ELSE            'three'
END
public <
The generic field type parameter
T
>
@NotNull CaseConditionStep<T>

Returns:

An intermediary step for case statement construction
when
(Condition
A condition to check in the case statement
condition
,
Select<? extends Record1<T>>
The result if the condition holds true
result
)

Deprecated as a consequence of Condition and CaseConditionStep being deprecated.
This construct can be used to create expressions of the type

CASE WHEN x < 1  THEN 'one'
     WHEN x >= 2 THEN 'two'
     ELSE            'three'
END
public <
The generic field type parameter
T
>
@NotNull CaseConditionStep<T>

Returns:

An intermediary step for case statement construction
when
(Field<Boolean>
A condition to check in the case statement
condition
,
T
The result if the condition holds true
result
)

Deprecated as a consequence of Field and CaseConditionStep being deprecated.
This construct can be used to create expressions of the type

CASE WHEN x < 1  THEN 'one'
     WHEN x >= 2 THEN 'two'
     ELSE            'three'
END
public <
The generic field type parameter
T
>
@NotNull CaseConditionStep<T>

Returns:

An intermediary step for case statement construction
when
(Field<Boolean>
A condition to check in the case statement
condition
,
Field<T>
The result if the condition holds true
result
)

Deprecated as a consequence of Field and CaseConditionStep being deprecated.
This construct can be used to create expressions of the type

CASE WHEN x < 1  THEN 'one'
     WHEN x >= 2 THEN 'two'
     ELSE            'three'
END
public <
The generic field type parameter
T
>
@NotNull CaseConditionStep<T>

Returns:

An intermediary step for case statement construction
when
(Field<Boolean>
A condition to check in the case statement
condition
,
Select<? extends Record1<T>>
The result if the condition holds true
result
)

Deprecated as a consequence of Field and CaseConditionStep being deprecated.
This construct can be used to create expressions of the type

CASE WHEN x < 1  THEN 'one'
     WHEN x >= 2 THEN 'two'
     ELSE            'three'
END

Method Detail

valueback to summary
public <V> @NotNull CaseValueStep<V> value(V value)

This construct can be used to create expressions of the type


CASE value WHEN 1 THEN 'one'
           WHEN 2 THEN 'two'
           ELSE        'three'
END
Parameters
<V>
The generic value type parameter
value:V

The value to do the case statement on

Returns:@NotNull CaseValueStep<V>

An intermediary step for case statement construction

Annotations
@NotNull
@Support
valueback to summary
public <V> @NotNull CaseValueStep<V> value(Field<V> value)

Deprecated

as a consequence of Field being deprecated. See corresponding docs for further information.

This construct can be used to create expressions of the type


CASE value WHEN 1 THEN 'one'
           WHEN 2 THEN 'two'
           ELSE        'three'
END
Parameters
<V>
The generic value type parameter
value:Field<V>

The value to do the case statement on

Returns:@NotNull CaseValueStep<V>

An intermediary step for case statement construction

Annotations
@NotNull
@Support
whenback to summary
public <T> @NotNull CaseConditionStep<T> when(Condition condition, T result)

Deprecated

as a consequence of Condition and CaseConditionStep being deprecated. See corresponding docs for further information.

This construct can be used to create expressions of the type


CASE WHEN x < 1  THEN 'one'
     WHEN x >= 2 THEN 'two'
     ELSE            'three'
END
Parameters
<T>
The generic field type parameter
condition:Condition

A condition to check in the case statement

result:T

The result if the condition holds true

Returns:@NotNull CaseConditionStep<T>

An intermediary step for case statement construction

Annotations
@NotNull
@Support
whenback to summary
public <T> @NotNull CaseConditionStep<T> when(Condition condition, Field<T> result)

Deprecated

as a consequence of Condition, Field and CaseConditionStep being deprecated. See corresponding docs for further information.

This construct can be used to create expressions of the type


CASE WHEN x < 1  THEN 'one'
     WHEN x >= 2 THEN 'two'
     ELSE            'three'
END
Parameters
<T>
The generic field type parameter
condition:Condition

A condition to check in the case statement

result:Field<T>

The result if the condition holds true

Returns:@NotNull CaseConditionStep<T>

An intermediary step for case statement construction

Annotations
@NotNull
@Support
whenback to summary
public <T> @NotNull CaseConditionStep<T> when(Condition condition, Select<? extends Record1<T>> result)

Deprecated

as a consequence of Condition and CaseConditionStep being deprecated. See corresponding docs for further information.

This construct can be used to create expressions of the type


CASE WHEN x < 1  THEN 'one'
     WHEN x >= 2 THEN 'two'
     ELSE            'three'
END
Parameters
<T>
The generic field type parameter
condition:Condition

A condition to check in the case statement

result:Select<? extends Record1<T>>

The result if the condition holds true

Returns:@NotNull CaseConditionStep<T>

An intermediary step for case statement construction

Annotations
@NotNull
@Support
whenback to summary
public <T> @NotNull CaseConditionStep<T> when(Field<Boolean> condition, T result)

Deprecated

as a consequence of Field and CaseConditionStep being deprecated. See corresponding docs for further information.

This construct can be used to create expressions of the type


CASE WHEN x < 1  THEN 'one'
     WHEN x >= 2 THEN 'two'
     ELSE            'three'
END
Parameters
<T>
The generic field type parameter
condition:Field<Boolean>

A condition to check in the case statement

result:T

The result if the condition holds true

Returns:@NotNull CaseConditionStep<T>

An intermediary step for case statement construction

Annotations
@NotNull
@Support
whenback to summary
public <T> @NotNull CaseConditionStep<T> when(Field<Boolean> condition, Field<T> result)

Deprecated

as a consequence of Field and CaseConditionStep being deprecated. See corresponding docs for further information.

This construct can be used to create expressions of the type


CASE WHEN x < 1  THEN 'one'
     WHEN x >= 2 THEN 'two'
     ELSE            'three'
END
Parameters
<T>
The generic field type parameter
condition:Field<Boolean>

A condition to check in the case statement

result:Field<T>

The result if the condition holds true

Returns:@NotNull CaseConditionStep<T>

An intermediary step for case statement construction

Annotations
@NotNull
@Support
whenback to summary
public <T> @NotNull CaseConditionStep<T> when(Field<Boolean> condition, Select<? extends Record1<T>> result)

Deprecated

as a consequence of Field and CaseConditionStep being deprecated. See corresponding docs for further information.

This construct can be used to create expressions of the type


CASE WHEN x < 1  THEN 'one'
     WHEN x >= 2 THEN 'two'
     ELSE            'three'
END
Parameters
<T>
The generic field type parameter
condition:Field<Boolean>

A condition to check in the case statement

result:Select<? extends Record1<T>>

The result if the condition holds true

Returns:@NotNull CaseConditionStep<T>

An intermediary step for case statement construction

Annotations
@NotNull
@Support