final class TriggerTable
    implements NamedRelation
    uses Snapshot
Public API: explicitly declared with @visibility public.

The table or view a trigger watches; the rows NEW and OLD refer to are rows of it.

Rule: SQLITE-TRIGGER-TABLE-001. The name denotes a declared relation found along the schema search path; the shape follows SQLITE-TABLE-SHAPE-001. Source: https://sqlite.org/lang_createtrigger.html. Status: Implemented.

Reading the table of a triggerdoctest
$trigger = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('CREATE TRIGGER r AFTER DELETE ON main.t BEGIN SELECT 1; END');
    [$trigger->statement->table->name()->schema->value, $trigger->statement->table->name()->name->value] // => ['main', 't']

Properties§

Methods§

public function __construct(public QualifiedName $name)

Parameters

$nameQualifiedNameThe table name
public function name(): QualifiedName

Answers the table name.

public function alias(): ?Name

Answers no correlation name: the rows are reached as NEW and OLD.

Returns

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

Resolves the name among the declared relations and derives the row shape of the table.

Parameters

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

Writes the name.

Parameters

$outOutput
Calls 3

Test cases 10§

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 9

Relations§

Instantiated in 1
Type declarations 1