final class Grouped
    implements Scalar
    uses Snapshot
Public API: explicitly declared with @visibility public.

An expression written in parentheses.

The grouping fixes the evaluation structure of its operand and is kept as written; rendering never adds or removes a grouping.

Rule: SQLITE-GROUPED-001. The type and the NULL fact are those of the operand. The name resolution stays with the operand, the node that is the name use; rules that look through groupings read it there. Source: https://sqlite.org/lang_expr.html. Status: Implemented.

Keeping a groupingdoctest
(new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('SELECT (1 + 2) * 3')->toString() // => 'SELECT (1 + 2) * 3'

Properties§

public Scalar $operand

Methods§

public function __construct(public Scalar $operand)

Parameters

$operandScalarThe grouped expression
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFact

Derives the operand; the grouping has its type and NULL fact.

Parameters

$derivationDerivation
$environmentEnvironment

Returns

Calls 2
public function render(Output $out): void

Writes the operand in parentheses.

Parameters

$outOutput
Calls 1

Test cases 21§

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

Dedicated tests 2
Other tests reaching this symbol 19

Relations§

Instantiated in 3
Type checks 19