final class EscapedRelation
    implements Relation
    uses Snapshot
Public API: explicitly declared with @visibility public.

The ODBC escape { word table_reference } of the 5.x grammars, where any identifier takes the place of OJ.

Rule: MYSQL-ODBC-JOIN-001. The server ignores the word; the braces group the reference like parentheses and change no name. Source: https://dev.mysql.com/doc/refman/5.7/en/join.html. Status: Implemented.

Reading a 5.x ODBC escapedoctest
$query = (new \SqlSemantics\Platform\MySql\Semantics('mysql-5.7.44'))->analyze('SELECT 1 FROM { oj t LEFT JOIN u ON t.a = u.a }');
    $query->statement->from->word->value // => 'oj'

Properties§

public Name $word
public Relation $relation

Methods§

public function __construct(public Name $word, public Relation $relation)

Parameters

$wordNameThe identifier written after the opening brace
$relationRelationThe escaped reference
public function deriveRelation(Derivation $derivation, Environment $environment): RelationFact

Derives the escaped reference.

Parameters

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

Writes the escape.

Parameters

$outOutput
Calls 2

Test cases 1§

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

Dedicated tests 1

Relations§

Instantiated in 1
Type checks 2
Type declarations 1