Adds a then clause to the case statement.
See thenRef for reference-first variant.
A then call can be followed by Whenable.when, Whenable.whenRef,
CaseWhenBuilder.else, CaseWhenBuilder.elseRef,
CaseWhenBuilder.end or CaseWhenBuilder.endCase call.
Note: Numbers, booleans, and null values are inlined directly into the
SQL query string (e.g. then 1, then true, then null) instead of being
added as parameterized values (e.g. then $1). This allows the database
engine to correctly infer the data type of the case expression result.
Without this behavior, all results would be returned as strings.
String values are always parameterized as usual.
Adds a then clause to the case statement where the value is a reference to a column.
See then for value-first variant.
A thenRef call can be followed by Whenable.when, Whenable.whenRef,
CaseWhenBuilder.else, CaseWhenBuilder.elseRef,
CaseWhenBuilder.end or CaseWhenBuilder.endCase call.
Adds a
thenclause to thecasestatement.See thenRef for reference-first variant.
A
thencall can be followed by Whenable.when, Whenable.whenRef, CaseWhenBuilder.else, CaseWhenBuilder.elseRef, CaseWhenBuilder.end or CaseWhenBuilder.endCase call.Note: Numbers, booleans, and
nullvalues are inlined directly into the SQL query string (e.g.then 1,then true,then null) instead of being added as parameterized values (e.g.then $1). This allows the database engine to correctly infer the data type of thecaseexpression result. Without this behavior, all results would be returned as strings.String values are always parameterized as usual.