Case Builder
interface CaseBuilder
DSL builder for constructing the branches of a CASE expression.
This interface provides the syntax for defining WHEN conditions, their corresponding THEN results, and an optional ELSE fallback.
Example:
select(
id,
name,
salary,
CASE {
WHEN { salary LT 50000 } THEN "Low"
WHEN { salary BETWEEN (50000..100000) } THEN "Medium"
ELSE("High")
} AS "salary_group",
).from(employees).execute()Content copied to clipboard
Author
MOHAMMAD AZIM ANSARI