enumKindRefusal
enum KindRefusal: string
@visibility public.The requests SQLite carries out only for one kind of relation.
Each case names the request; its value says what the request needs. A view refuses DROP TABLE, every ALTER TABLE form, CREATE INDEX, BEFORE and AFTER triggers and an upsert; a table refuses DROP VIEW and INSTEAD OF triggers. Release 3.47.2 reports, in order of the cases: "use DROP VIEW to
- delete view", "use DROP TABLE to delete table", "view may not be altered",
"Cannot add a column to a view", "cannot drop column from view", "cannot
- rename columns of view", "views may not be indexed", "cannot create BEFORE
- trigger on view", "cannot create AFTER trigger on view", "cannot create
- INSTEAD OF trigger on table" and "cannot UPSERT a view" (
build.c,
alter.c, trigger.c, insert.c). Source: https://sqlite.org/lang_droptable.html, https://sqlite.org/lang_dropview.html, https://sqlite.org/lang_altertable.html, https://sqlite.org/lang_createindex.html, https://sqlite.org/lang_createtrigger.html#instead_of_triggers, https://sqlite.org/lang_upsert.html.
\SqlSemantics\Platform\Sqlite\Statement\Schema\Refusal\KindRefusal::DropView->required() // => \SqlSemantics\Platform\Sqlite\Model\Statement\Declaration\RelationKind::ViewCases§
case DropTable = 'DROP TABLE removes only a table.'case DropView = 'DROP VIEW removes only a view.'case RenameTable = 'ALTER TABLE renames only a table.'case AddColumn = 'ALTER TABLE adds a column only to a table.'case DropColumn = 'ALTER TABLE drops a column only from a table.'case RenameColumn = 'ALTER TABLE renames a column only of a table.'case CreateIndex = 'CREATE INDEX indexes only a table.'case BeforeTrigger = 'A BEFORE trigger watches only a table.'case AfterTrigger = 'An AFTER trigger watches only a table.'case InsteadOfTrigger = 'An INSTEAD OF trigger watches only a view.'case Upsert = 'An upsert writes only to a table.'Methods§
public function required(): RelationKindAnswers the kind of relation the request needs.
Returns
Test cases 1
Called from 2
- method-call SqlSemantics\Platform\Sqlite\Rules\Definition\RelationKinds::refuse() packages/sql-semantics-sqlite/src/Rules/Definition/RelationKinds.php:36
- method-call SqlSemantics\Platform\Sqlite\Statement\Schema\Refusal\WrongRelationKind::__construct() packages/sql-semantics-sqlite/src/Statement/Schema/Refusal/WrongRelationKind.php:35
Calls 4
- class-const KindRefusal::DropView() line 49
- class-const KindRefusal::InsteadOfTrigger() line 49
- class-const RelationKind::View() line 49
- class-const RelationKind::BaseTable() line 49
Test cases 5§
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 4
RelationKindsTest::testRefuseReportsWhatSqliteRefusesForTheKindOfTheRelationcallsDropTest::testDeriveStatementReportsTheDropOfARelationOfTheOtherKindcallsWrongRelationKindTest::testMessageIsNeverAboutARelationOfTheKindTheRequestNeedscallsWrongRelationKindTest::testMessageNamesTheRelationItsKindAndTheRequestcalls
Relations§
Method calls 2
- method-call SqlSemantics\Platform\Sqlite\Rules\Definition\RelationKinds::refuse() packages/sql-semantics-sqlite/src/Rules/Definition/RelationKinds.php:36
- method-call SqlSemantics\Platform\Sqlite\Statement\Schema\Refusal\WrongRelationKind::__construct() packages/sql-semantics-sqlite/src/Statement/Schema/Refusal/WrongRelationKind.php:35
Constant reads 11
- class-const SqlSemantics\Platform\Sqlite\Rules\Mutation\InsertFacts::derive() packages/sql-semantics-sqlite/src/Rules/Mutation/InsertFacts.php:57
- class-const SqlSemantics\Platform\Sqlite\Rules\Mutation\TriggerFacts::derive() packages/sql-semantics-sqlite/src/Rules/Mutation/TriggerFacts.php:53
- class-const SqlSemantics\Platform\Sqlite\Rules\Mutation\TriggerFacts::derive() packages/sql-semantics-sqlite/src/Rules/Mutation/TriggerFacts.php:54
- class-const SqlSemantics\Platform\Sqlite\Rules\Mutation\TriggerFacts::derive() packages/sql-semantics-sqlite/src/Rules/Mutation/TriggerFacts.php:55
- class-const SqlSemantics\Platform\Sqlite\Statement\Schema\AlterAddColumn::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterAddColumn.php:69
- class-const SqlSemantics\Platform\Sqlite\Statement\Schema\AlterDropColumn::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterDropColumn.php:58
- class-const SqlSemantics\Platform\Sqlite\Statement\Schema\AlterRenameColumn::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterRenameColumn.php:57
- class-const SqlSemantics\Platform\Sqlite\Statement\Schema\AlterRenameTable::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterRenameTable.php:53
- class-const SqlSemantics\Platform\Sqlite\Statement\Schema\CreateIndex::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/CreateIndex.php:105
- class-const SqlSemantics\Platform\Sqlite\Statement\Schema\Drop::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/Drop.php:66
- class-const SqlSemantics\Platform\Sqlite\Statement\Schema\Drop::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/Drop.php:66