classRelationKinds
final class RelationKinds
Reports a request that SQLite carries out only for another kind of relation than the one it names.
Rule: SQLITE-RELATION-KIND-001. CREATE VIEW declares a view; every other declaration is a table. Where a name resolves to one declaration, a request that needs the other kind is a diagnostic (KindRefusal), and SQLite refuses it before it looks at anything else of the request. A name that is undeclared, or resolves only conditionally, leaves the kind undecided and is not reported. Writing to a view with INSERT, UPDATE or DELETE succeeds exactly when an INSTEAD OF trigger handles it; a context does not hold triggers, so such writes are not reported. Source: https://sqlite.org/lang_createview.html, https://sqlite.org/lang_createtrigger.html#instead_of_triggers. Status: Implemented.
Methods§
public function refuse(RelationFact $fact, KindRefusal $refusal, Derivation $derivation): boolReports a request the kind of the named relation rules out, and tells whether it did.
Parameters
$fact | RelationFact | |
$refusal | KindRefusal | |
$derivation | Derivation |
Returns
boolCalled from 8
- method-call SqlSemantics\Platform\Sqlite\Rules\Mutation\InsertFacts::derive() packages/sql-semantics-sqlite/src/Rules/Mutation/InsertFacts.php:57
- method-call SqlSemantics\Platform\Sqlite\Rules\Mutation\TriggerFacts::derive() packages/sql-semantics-sqlite/src/Rules/Mutation/TriggerFacts.php:52
- method-call SqlSemantics\Platform\Sqlite\Statement\Schema\AlterAddColumn::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterAddColumn.php:69
- method-call SqlSemantics\Platform\Sqlite\Statement\Schema\AlterDropColumn::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterDropColumn.php:58
- method-call SqlSemantics\Platform\Sqlite\Statement\Schema\AlterRenameColumn::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterRenameColumn.php:57
- method-call SqlSemantics\Platform\Sqlite\Statement\Schema\AlterRenameTable::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterRenameTable.php:53
- method-call SqlSemantics\Platform\Sqlite\Statement\Schema\CreateIndex::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/CreateIndex.php:105
- method-call SqlSemantics\Platform\Sqlite\Statement\Schema\Drop::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/Drop.php:66
Calls 3
- method-call KindRefusal::required() line 36
- method-call Derivation::report() line 39
- new WrongRelationKind line 39
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
RelationKindsTestcalls
Relations§
Instantiated in 8
- new SqlSemantics\Platform\Sqlite\Rules\Mutation\InsertFacts::derive() packages/sql-semantics-sqlite/src/Rules/Mutation/InsertFacts.php:57
- new SqlSemantics\Platform\Sqlite\Rules\Mutation\TriggerFacts::derive() packages/sql-semantics-sqlite/src/Rules/Mutation/TriggerFacts.php:52
- new SqlSemantics\Platform\Sqlite\Statement\Schema\AlterAddColumn::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterAddColumn.php:69
- new SqlSemantics\Platform\Sqlite\Statement\Schema\AlterDropColumn::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterDropColumn.php:58
- new SqlSemantics\Platform\Sqlite\Statement\Schema\AlterRenameColumn::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterRenameColumn.php:57
- new SqlSemantics\Platform\Sqlite\Statement\Schema\AlterRenameTable::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterRenameTable.php:53
- new SqlSemantics\Platform\Sqlite\Statement\Schema\CreateIndex::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/CreateIndex.php:105
- new SqlSemantics\Platform\Sqlite\Statement\Schema\Drop::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/Drop.php:66
Method calls 8
- method-call SqlSemantics\Platform\Sqlite\Rules\Mutation\InsertFacts::derive() packages/sql-semantics-sqlite/src/Rules/Mutation/InsertFacts.php:57
- method-call SqlSemantics\Platform\Sqlite\Rules\Mutation\TriggerFacts::derive() packages/sql-semantics-sqlite/src/Rules/Mutation/TriggerFacts.php:52
- method-call SqlSemantics\Platform\Sqlite\Statement\Schema\AlterAddColumn::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterAddColumn.php:69
- method-call SqlSemantics\Platform\Sqlite\Statement\Schema\AlterDropColumn::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterDropColumn.php:58
- method-call SqlSemantics\Platform\Sqlite\Statement\Schema\AlterRenameColumn::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterRenameColumn.php:57
- method-call SqlSemantics\Platform\Sqlite\Statement\Schema\AlterRenameTable::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/AlterRenameTable.php:53
- method-call SqlSemantics\Platform\Sqlite\Statement\Schema\CreateIndex::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/CreateIndex.php:105
- method-call SqlSemantics\Platform\Sqlite\Statement\Schema\Drop::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/Drop.php:66