final class ConstructorRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql\Lowering". Code outside that scope must not name this declaration.

Lowers row constructors, array constructors and CASE.

Rule: PG-EXPRESSION-CONSTRUCTOR-001. Scope: row, explicit_row, implicit_row, array_expr, array_expr_list, case_expr, case_arg, when_clause_list, when_clause and case_default. Constructors: RowConstructor, ArrayItems, CaseExpression, CaseBranch. Termination: lists are flattened iteratively; nested array levels recurse on the depth of the tree. Source: https://www.postgresql.org/docs/17/sql-expressions.html#SQL-SYNTAX-ROW-CONSTRUCTORS, https://www.postgresql.org/docs/17/sql-expressions.html#SQL-SYNTAX-ARRAY-CONSTRUCTORS, https://www.postgresql.org/docs/17/functions-conditional.html#FUNCTIONS-CASE. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function optional(Node $optional, string $present, string $absent): ?Scalar

Lowers case_arg or case_default: the expression, or null when none is written.

Parameters

$optionalNode
$presentstring
$absentstring

Returns

Throws

ImplementationGap When the production has no rule
Test cases 1
Called from 1
Calls 2

Private surface 1§

Implementation details, listed for orientation only.

private Lowering $lowering

Test cases 4§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 4

Relations§

Instantiated in 4
Method calls 4