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

FROM DUAL: the dummy table of one row and no columns.

Rule: MYSQL-DUAL-001. The shape is complete and empty; no name refers to it. Source: https://dev.mysql.com/doc/refman/8.4/en/select.html ("DUAL is purely for the convenience of people who require that all SELECT statements should have FROM"). Status: Implemented.

Reading a selection from DUALdoctest
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('SELECT 1 FROM DUAL');
    $query->statement->from instanceof \SqlSemantics\Platform\MySql\Statement\Relation\Dual // => true

Methods§

public function deriveRelation(Derivation $derivation, Environment $environment): RelationFact

Answers the empty row.

Parameters

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

Writes the keyword.

Parameters

$outOutput
Calls 1

Test cases 28§

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 27

Relations§

Instantiated in 2