final class WrongRelationKind
    implements Diagnostic
    uses Snapshot
Public API: explicitly declared with @visibility public.

A request SQLite refuses because the relation it names is of another kind.

Source: https://sqlite.org/lang_dropview.html, https://sqlite.org/lang_createtrigger.html#instead_of_triggers.

Reporting DROP TABLE of a viewdoctest
$semantics = new \SqlSemantics\Platform\Sqlite\Semantics();
    $view = $semantics->analyze('CREATE VIEW v AS SELECT 1');
    $semantics->analyze('DROP TABLE v', [$view]) // throws \SqlSemantics\Platform\Sqlite\Model\Diagnostic\SemanticException: Relation v is a view: DROP TABLE removes only a table.

Properties§

public Table $relation
public KindRefusal $refusal

Methods§

public function __construct(public Table $relation, public KindRefusal $refusal)

Parameters

$relationTableThe declaration the name resolved to
$refusalKindRefusalThe request and the kind it needs

Throws

InvalidConstruction When the relation is of the kind the request needs
Calls 2
public function message(): string

Test cases 4§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 2
Other tests reaching this symbol 2

Relations§

Instantiated in 1