final class BoundSelect
Public API: explicitly declared with @visibility public.

A bound SELECT statement: sources, row conditions, ordered outputs, and result modifiers.

Accept this semantic value in a database-independent consumerdoctest
$consume = static fn (\SqlSemantics\Core\Model\BoundSelect $value): string => $value::class;
    $consume instanceof \Closure // => true

Properties§

public string $scopeId
public TableUse|Join|null $from
public list<TableUse> $relations
public list<OutputColumn> $outputs
public Expression|null $where
public bool $distinct
public list<Ordering> $orderBy
public Expression|null $limit
public Expression|null $offset
public Node $source

Methods§

public function __construct(
    public string $scopeId,
    public TableUse|Join|null $from,
    public list<TableUse> $relations,
    public list<OutputColumn> $outputs,
    public Expression|null $where,
    public bool $distinct,
    public list<Ordering> $orderBy,
    public Expression|null $limit,
    public Expression|null $offset,
    public Node $source,
)

Parameters

$scopeIdstringStable scope identity within this bound statement
$fromTableUse|Join|nullLogical input, absent for a constant SELECT
$relationslist<TableUse>Table occurrences in binding order
$outputslist<OutputColumn>Ordered result columns
$whereExpression|nullPredicate applied after joins; only TRUE retains a row
$distinctboolWhether duplicate output tuples are removed
$orderBylist<Ordering>Ordered sort keys
$limitExpression|nullMaximum row count expression
$offsetExpression|nullNumber of rows to skip
$sourceNodeOriginal SELECT tree

Test cases 60§

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

Dedicated tests 1
Other tests reaching this symbol 59

Relations§

Instantiated in 1
Type declarations 2