classTriggerEvent
final class TriggerEvent
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.One event a trigger fires on; UPDATE may name columns.
Mirrors one bit of events with columns for UPDATE OF. Source: https://www.postgresql.org/docs/17/sql-createtrigger.html.
$statement = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TRIGGER g AFTER UPDATE OF a, b ON t EXECUTE FUNCTION f()');
count($statement->statement->events[0]->columns) // => 2Properties§
public list<Name> $columnspublic TriggerEventKind $kindMethods§
public function __construct(public TriggerEventKind $kind, list<Name> $columns = [])Parameters
$kind | TriggerEventKind | The event |
$columns | list<Name> | The columns of UPDATE OF |
Calls 4
- static-call Check::listOf() line 40
- class-const Name::class() line 40
- static-call Check::input() line 41
- class-const TriggerEventKind::Update() line 41
public function render(Output $out): voidWrites the event.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 49
- method-call Writing::names() line 52
- new Writing line 52
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 2
Constant reads 2
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\Trigger\CreateConstraintTrigger::__construct() packages/sql-semantics-postgres/src/Statement/Table/Trigger/CreateConstraintTrigger.php:79
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\Trigger\CreateTrigger::__construct() packages/sql-semantics-postgres/src/Statement/Table/Trigger/CreateTrigger.php:80