final class RelationReader
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

Reads endpoints and optional relation groups from one statement.

Methods§

public function __construct(private RelationCursor $cursor)

Reads from the supplied statement cursor.

Parameters

public function parseStatement(): list<Relation>|string

A statement is either a bare table name or one relation, which expands to several when its target is a group.

Returns

list<Relation>|string
Test cases 1
Called from 1
Calls 9
public function buildRelations(
    ColumnRef $left,
    RelationKind $kind,
    list<ColumnRef> $targets,
    bool $leftOptional,
    bool $rightOptional,
): list<Relation>

A grouped target expands to one relation per endpoint, so grouping is only ever a shorthand for repeating the left end.

Parameters

$leftColumnRef
$kindRelationKind
$targetslist<ColumnRef>
$leftOptionalbool
$rightOptionalbool

Returns

list<Relation>
Test cases 1
Called from 1
Calls 2

Private surface 1§

Implementation details, listed for orientation only.

private RelationCursor $cursor

Test cases 34§

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

Dedicated tests 4
Other tests reaching this symbol 30

Relations§

Instantiated in 1
Method calls 1