enumReferenceAction
enum ReferenceAction: string
Public API: explicitly declared with
@visibility public.What a foreign key does when a referenced row changes.
Mirrors the FKCONSTR_ACTION_* codes. NO ACTION is the default and is kept when written. Source: https://www.postgresql.org/docs/17/sql-createtable.html#SQL-CREATETABLE-PARMS-REFERENCES.
$create = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TABLE t (a int REFERENCES u ON UPDATE SET NULL)');
$create->statement->definition->elements[0]->qualifiers[0]->actions[0]->action // => \SqlSemantics\Platform\PostgreSql\Statement\Constraint\Reference\ReferenceAction::SetNullCases§
case NoAction = 'NO ACTION'case Restrict = 'RESTRICT'case Cascade = 'CASCADE'case SetNull = 'SET NULL'case SetDefault = 'SET DEFAULT'Methods§
public function setsColumns(): boolTells whether the action may name the columns it sets.
Returns
boolCalled from 1
Calls 5
- class-const ReferenceAction::SetNull() line 33
- class-const ReferenceAction::SetDefault() line 33
- class-const ReferenceAction::NoAction() line 34
- class-const ReferenceAction::Restrict() line 34
- class-const ReferenceAction::Cascade() line 34
Test cases 3§
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 2
Relations§
Method calls 1
Constant reads 10
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Table\ConstraintRule packages/sql-semantics-postgres/src/Lowering/Table/ConstraintRule.php:63
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Table\ConstraintRule packages/sql-semantics-postgres/src/Lowering/Table/ConstraintRule.php:63
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Table\ConstraintRule packages/sql-semantics-postgres/src/Lowering/Table/ConstraintRule.php:64
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Table\ConstraintRule packages/sql-semantics-postgres/src/Lowering/Table/ConstraintRule.php:64
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Table\ConstraintRule packages/sql-semantics-postgres/src/Lowering/Table/ConstraintRule.php:65
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\GeneratedColumns::keyActions() packages/sql-semantics-postgres/src/Rules/Table/Definition/GeneratedColumns.php:128
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\GeneratedColumns::keyActions() packages/sql-semantics-postgres/src/Rules/Table/Definition/GeneratedColumns.php:128
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\GeneratedColumns::keyActions() packages/sql-semantics-postgres/src/Rules/Table/Definition/GeneratedColumns.php:128
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\GeneratedColumns::keyActions() packages/sql-semantics-postgres/src/Rules/Table/Definition/GeneratedColumns.php:129
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\GeneratedColumns::keyActions() packages/sql-semantics-postgres/src/Rules/Table/Definition/GeneratedColumns.php:129