classTriggerTransition
final class TriggerTransition
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.One REFERENCING item: a name for the old or new transition table.
Mirrors PostgreSQL's TriggerTransition. The optional AS is not kept. ROW transition variables are not supported by the server, which is reported. Transition tables are visible to the trigger function only. Source: https://www.postgresql.org/docs/17/sql-createtrigger.html.
$statement = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TRIGGER g AFTER INSERT ON t REFERENCING NEW TABLE AS fresh FOR EACH STATEMENT EXECUTE FUNCTION f()');
$statement->statement->transitions[0]->name->value // => 'fresh'Properties§
public bool $newpublic bool $tablepublic Name $nameMethods§
public function __construct(public bool $new, public bool $table, public Name $name)Parameters
$new | bool | Whether the item names the new rows; the old ones otherwise |
$table | bool | Whether TABLE is written; ROW otherwise |
$name | Name | The name |
public function render(Output $out): voidTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
TriggerTransitionTestcalls