Selecto.Builder.CaseExpression (Selecto v0.3.15)
SQL generation for PostgreSQL CASE expressions.
Generates SQL for both simple and searched CASE expressions with proper condition handling, value escaping, and PostgreSQL-specific syntax.
Link to this section Summary
Functions
Build CASE expression SQL from specification.
Build CASE expression SQL for SELECT clause integration.
Link to this section Functions
Link to this function
build_case_expression(spec, selecto \\ nil)
Build CASE expression SQL from specification.
Returns {case_expression_iodata, parameters} tuple with proper PostgreSQL CASE syntax and parameter bindings.
Link to this function
build_case_for_select(spec, selecto \\ nil)
Build CASE expression SQL for SELECT clause integration.
Returns formatted CASE expression with proper aliasing for column selection.