classWrongRelationKind
final class WrongRelationKind
implements Diagnostic
uses Snapshot
Public API: explicitly declared with
@visibility public.A name whose declaration is a base table where the statement needs a view, or a view where it needs a base table.
The server refuses the statement (MYSQL-RELATION-KIND-001). Source: https://dev.mysql.com/doc/mysql-errors/8.4/en/server-error-reference.html.
(new \SqlSemantics\Platform\MySql\Statement\Table\Problem\WrongRelationKind(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\QualifiedName(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('t'), new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('shop')), \SqlSemantics\Platform\MySql\Statement\Table\Problem\KindRefusal::NotView))->message() // => 'shop.t is not VIEW.'Properties§
public QualifiedName $namepublic KindRefusal $refusalMethods§
public function __construct(public QualifiedName $name, public KindRefusal $refusal)Parameters
$name | QualifiedName | The name as the statement wrote it |
$refusal | KindRefusal | What the server reports |
public function message(): stringDescribes the problem.
Returns
stringTest cases 1
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§
Instantiated in 2
- new SqlSemantics\Platform\MySql\Rules\TableDefinition\RelationKinds::require() packages/sql-semantics-mysql/src/Rules/TableDefinition/RelationKinds.php:62
- new SqlSemantics\Platform\MySql\Rules\TableDefinition\RelationKinds::refuseView() packages/sql-semantics-mysql/src/Rules/TableDefinition/RelationKinds.php:72