final class ForeignKeyRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\Sqlite". Code outside that scope must not name this declaration.

Lowers the clauses of a foreign key.

Rule: SQLITE-FOREIGN-KEY-LOWER-001. Scope: refargs, refarg, refact, defer_subclause, defer_subclause_opt, init_deferred_pred_opt, and the REFERENCES part shared by the column and the table constraint. Constructors: ForeignKeyClause, MatchName, ReferenceAction, Deferrability. The actions and MATCH names keep their written order; every keyword is a model value. Terminates: the argument list is flattened iteratively. Source: https://sqlite.org/syntax/foreign-key-clause.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function arguments(Node $list): list<ReferenceArgument>

Lowers the actions and MATCH names in written order.

Parameters

$listNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 4
public function optionalDeferrability(Node $clause): ?Deferrability

Lowers the optional DEFERRABLE clause of a table constraint.

Parameters

$clauseNode

Throws

ImplementationGap When the production has no rule
Called from 1
Calls 2

Private surface 3§

Implementation details, listed for orientation only.

private const EVENTS = ['refarg: ON INSERT refact' => \SqlSemantics\Platform\Sqlite\Statement\Schema\R…
private const REACTIONS = ['refact: SET NULL' => \SqlSemantics\Platform\Sqlite\Statement\Schema\Reference…
private Lowering $lowering

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
Method calls 4
Type declarations 2