enumKindRule
enum KindRule: string
Public API: explicitly declared with
@visibility public.The rules a command breaks when it names a relation of a kind it does not accept, in the words of the server.
%1$s stands for the relation name, %2$s for the ALTER action. Source: tablecmds.c (DropErrorMsgWrongType, RangeVarCallbackForAlterRelation, ATSimplePermissions, truncate_check_rel, MergeAttributes, renameatt_check), objectaddress.c, matview.c, indexcmds.c, execMain.c (CheckValidResultRel, CheckValidRowMarkRel), parse_merge.c, copyto.c, copyfrom.c, lockcmds.c, parse_utilcmd.c, trigger.c, rewriteDefine.c, policy.c, statscmds.c, sequence.c.
$semantics = new \SqlSemantics\Platform\PostgreSql\Semantics();
$semantics->analyze('DROP VIEW t', [$semantics->analyze('CREATE TABLE t (a int)')])->facts->diagnostics[0]->rule // => \SqlSemantics\Platform\PostgreSql\Statement\Table\Problem\KindRule::NotViewCases§
case NotTable = '"%1$s" is not a table'case NotView = '"%1$s" is not a view'case NotMaterializedView = '"%1$s" is not a materialized view'case NotForeignTable = '"%1$s" is not a foreign table'case NotSequence = '"%1$s" is not a sequence'case NotIndex = '"%1$s" is not an index'case NotTableOrMaterializedView = '"%1$s" is not a table or materialized view'case AlterAction = 'ALTER action %2$s cannot be performed on relation "%1$s"'case RenameColumns = 'cannot rename columns of relation "%1$s"'case OpenSequence = 'cannot open relation "%1$s"'case ChangeSequence = 'cannot change sequence "%1$s"'case ChangeMaterializedView = 'cannot change materialized view "%1$s"'case Merge = 'cannot execute MERGE on relation "%1$s"'case LockSequenceRows = 'cannot lock rows in sequence "%1$s"'case LockMaterializedViewRows = 'cannot lock rows in materialized view "%1$s"'case LockRelation = 'cannot lock relation "%1$s"'case IndexRelation = 'cannot create index on relation "%1$s"'case CopyFromView = 'cannot copy from view "%1$s"'case CopyFromMaterializedView = 'cannot copy from materialized view "%1$s"'case CopyFromForeignTable = 'cannot copy from foreign table "%1$s"'case CopyFromSequence = 'cannot copy from sequence "%1$s"'case CopyToMaterializedView = 'cannot copy to materialized view "%1$s"'case CopyToSequence = 'cannot copy to sequence "%1$s"'case LikeSource = 'relation "%1$s" is invalid in LIKE clause'case InheritedRelation = 'inherited relation "%1$s" is not a table or foreign table'case ReferencedRelation = 'referenced relation "%1$s" is not a table'case TriggersOnRelation = 'relation "%1$s" cannot have triggers'case TriggerOnTable = '"%1$s" is a table'case TriggerOnView = '"%1$s" is a view'case TriggerOnForeignTable = '"%1$s" is a foreign table'case RulesOnRelation = 'relation "%1$s" cannot have rules'case RulesOnMaterializedView = 'rules on materialized views are not supported'case SequenceOwner = 'sequence cannot be owned by relation "%1$s"'case StatisticsRelation = 'cannot define statistics for relation "%1$s"'case ForeignPrimaryKey = 'primary key constraints are not supported on foreign tables'case ForeignUnique = 'unique constraints are not supported on foreign tables'case ForeignExclusion = 'exclusion constraints are not supported on foreign tables'case ForeignForeignKey = 'foreign key constraints are not supported on foreign tables'Methods§
public function namesRelation(): boolTells whether the message names the relation.
Returns
boolCalled from 1
Calls 1
- function-call
str_containsline 67
Test cases 5§
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 3
Relations§
Method calls 1
Constant reads 47
- class-const SqlSemantics\Platform\PostgreSql\Rules\Manipulation\CopyFacts::kind() packages/sql-semantics-postgres/src/Rules/Manipulation/CopyFacts.php:82
- class-const SqlSemantics\Platform\PostgreSql\Rules\Manipulation\CopyFacts::kind() packages/sql-semantics-postgres/src/Rules/Manipulation/CopyFacts.php:83
- class-const SqlSemantics\Platform\PostgreSql\Rules\Manipulation\CopyFacts::kind() packages/sql-semantics-postgres/src/Rules/Manipulation/CopyFacts.php:84
- class-const SqlSemantics\Platform\PostgreSql\Rules\Manipulation\CopyFacts::kind() packages/sql-semantics-postgres/src/Rules/Manipulation/CopyFacts.php:85
- class-const SqlSemantics\Platform\PostgreSql\Rules\Manipulation\CopyFacts::kind() packages/sql-semantics-postgres/src/Rules/Manipulation/CopyFacts.php:88
- class-const SqlSemantics\Platform\PostgreSql\Rules\Manipulation\CopyFacts::kind() packages/sql-semantics-postgres/src/Rules/Manipulation/CopyFacts.php:89
- class-const SqlSemantics\Platform\PostgreSql\Rules\Query\Locking::kinds() packages/sql-semantics-postgres/src/Rules/Query/Locking.php:109
- class-const SqlSemantics\Platform\PostgreSql\Rules\Query\Locking::kinds() packages/sql-semantics-postgres/src/Rules/Query/Locking.php:111
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\Command\AlterKinds::check() packages/sql-semantics-postgres/src/Rules/Table/Command/AlterKinds.php:93
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\Command\AlterKinds::parent() packages/sql-semantics-postgres/src/Rules/Table/Command/AlterKinds.php:128
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\Command\Policies::derive() packages/sql-semantics-postgres/src/Rules/Table/Command/Policies.php:41
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\Command\RewriteRules::derive() packages/sql-semantics-postgres/src/Rules/Table/Command/RewriteRules.php:46
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\Command\RewriteRules::derive() packages/sql-semantics-postgres/src/Rules/Table/Command/RewriteRules.php:48
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Definitions::elements() packages/sql-semantics-postgres/src/Rules/Table/Definition/Definitions.php:126
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Indexes::derive() packages/sql-semantics-postgres/src/Rules/Table/Definition/Indexes.php:46
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\ForeignKeys::derive() packages/sql-semantics-postgres/src/Rules/Table/ForeignKeys.php:67
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::renamed() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:131
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::modified() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:149
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::modified() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:151
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::modified() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:151
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::foreign() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:169
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::foreign() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:170
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::foreign() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:171
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::foreign() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:172
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::triggered() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:193
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::triggered() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:194
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::triggered() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:195
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::triggered() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:196
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::expected() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:212
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::expected() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:213
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::expected() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:214
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::expected() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:215
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::expected() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:216
- class-const SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::expected() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:217
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Access\Target\RelationsTarget::deriveTarget() packages/sql-semantics-postgres/src/Statement/Catalog/Access/Target/RelationsTarget.php:77
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\Element\LikeClause::deriveClause() packages/sql-semantics-postgres/src/Statement/Table/Element/LikeClause.php:63
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\Index\CreateStatistics::deriveStatement() packages/sql-semantics-postgres/src/Statement/Table/Index/CreateStatistics.php:85
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\Problem\KindProblem::__construct() packages/sql-semantics-postgres/src/Statement/Table/Problem/KindProblem.php:36
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\Sequence\AlterSequence::deriveStatement() packages/sql-semantics-postgres/src/Statement/Table/Sequence/AlterSequence.php:65
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\Sequence\AlterSequence::deriveStatement() packages/sql-semantics-postgres/src/Statement/Table/Sequence/AlterSequence.php:65
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\Sequence\SequenceReference::deriveClause() packages/sql-semantics-postgres/src/Statement/Table/Sequence/SequenceReference.php:53
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\TruncateTable::deriveStatement() packages/sql-semantics-postgres/src/Statement/Table/TruncateTable.php:63
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\View\RefreshMaterializedView::deriveStatement() packages/sql-semantics-postgres/src/Statement/Table/View/RefreshMaterializedView.php:58
- class-const SqlSemantics\Platform\PostgreSql\Statement\Table\View\RefreshMaterializedView::deriveStatement() packages/sql-semantics-postgres/src/Statement/Table/View/RefreshMaterializedView.php:58
- class-const SqlSemantics\Platform\PostgreSql\Statement\Utility\Maintenance\Cluster::deriveStatement() packages/sql-semantics-postgres/src/Statement/Utility/Maintenance/Cluster.php:79
- class-const SqlSemantics\Platform\PostgreSql\Statement\Utility\Maintenance\Lock::deriveStatement() packages/sql-semantics-postgres/src/Statement/Utility/Maintenance/Lock.php:70
- class-const SqlSemantics\Platform\PostgreSql\Statement\Utility\Maintenance\Reindex::deriveStatement() packages/sql-semantics-postgres/src/Statement/Utility/Maintenance/Reindex.php:88