classDefinitionProblem
final class DefinitionProblem
implements Diagnostic
uses Snapshot
Public API: explicitly declared with
@visibility public.A definition of a table, index, view, sequence, trigger, rule or policy that PostgreSQL rejects.
(new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TABLE t (a int, b int GENERATED BY DEFAULT AS (a) STORED)') // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\SemanticException: for a generated column, GENERATED ALWAYS must be specifiednew \SqlSemantics\Platform\PostgreSql\Statement\Table\Problem\DefinitionProblem(\SqlSemantics\Platform\PostgreSql\Statement\Table\Problem\DefinitionRule::DuplicateColumn, new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('a'), new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('t')) // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\InvalidConstructionProperties§
public DefinitionRule $rulepublic Name|null $subject = nullpublic Name|null $relation = nullMethods§
public function __construct(
public DefinitionRule $rule,
public Name|null $subject = null,
public Name|null $relation = null,
)Parameters
$rule | DefinitionRule | The broken rule |
$subject | Name|null | The name the problem is about, for the rules that name one |
$relation | Name|null | The relation of the subject, for the rules that name both |
Calls 2
- static-call Check::input() line 32
- function-call
substr_countline 32
public function message(): stringDescribes the broken rule in the words of PostgreSQL.
Returns
stringTest cases 1
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§
Instantiated in 44
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Attributes::report() packages/sql-semantics-postgres/src/Rules/Table/Attributes.php:62
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Attributes::report() packages/sql-semantics-postgres/src/Rules/Table/Attributes.php:65
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Attributes::report() packages/sql-semantics-postgres/src/Rules/Table/Attributes.php:69
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Attributes::report() packages/sql-semantics-postgres/src/Rules/Table/Attributes.php:72
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Attributes::report() packages/sql-semantics-postgres/src/Rules/Table/Attributes.php:75
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Command\Alterations::identity() packages/sql-semantics-postgres/src/Rules/Table/Command/Alterations.php:115
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Command\Alterations::column() packages/sql-semantics-postgres/src/Rules/Table/Command/Alterations.php:148
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Command\GeneratedChanges::check() packages/sql-semantics-postgres/src/Rules/Table/Command/GeneratedChanges.php:51
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Command\GeneratedChanges::check() packages/sql-semantics-postgres/src/Rules/Table/Command/GeneratedChanges.php:58
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Command\TriggerReferences::check() packages/sql-semantics-postgres/src/Rules/Table/Command/TriggerReferences.php:68
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Command\Triggers::derive() packages/sql-semantics-postgres/src/Rules/Table/Command/Triggers.php:70
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Command\Triggers::event() packages/sql-semantics-postgres/src/Rules/Table/Command/Triggers.php:120
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Command\Triggers::event() packages/sql-semantics-postgres/src/Rules/Table/Command/Triggers.php:124
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Conditions::derive() packages/sql-semantics-postgres/src/Rules/Table/Conditions.php:41
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\CreationSchemas::check() packages/sql-semantics-postgres/src/Rules/Table/Definition/CreationSchemas.php:45
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\CreationSchemas::check() packages/sql-semantics-postgres/src/Rules/Table/Definition/CreationSchemas.php:48
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Definitions::report() packages/sql-semantics-postgres/src/Rules/Table/Definition/Definitions.php:149
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Definitions::report() packages/sql-semantics-postgres/src/Rules/Table/Definition/Definitions.php:155
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Definitions::report() packages/sql-semantics-postgres/src/Rules/Table/Definition/Definitions.php:159
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Definitions::report() packages/sql-semantics-postgres/src/Rules/Table/Definition/Definitions.php:166
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Definitions::report() packages/sql-semantics-postgres/src/Rules/Table/Definition/Definitions.php:171
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\GeneratedColumns::expression() packages/sql-semantics-postgres/src/Rules/Table/Definition/GeneratedColumns.php:86
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\GeneratedColumns::partitionKey() packages/sql-semantics-postgres/src/Rules/Table/Definition/GeneratedColumns.php:96
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\GeneratedColumns::keyActions() packages/sql-semantics-postgres/src/Rules/Table/Definition/GeneratedColumns.php:134
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\GeneratedColumns::inherited() packages/sql-semantics-postgres/src/Rules/Table/Definition/GeneratedColumns.php:175
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\GeneratedColumns::merged() packages/sql-semantics-postgres/src/Rules/Table/Definition/GeneratedColumns.php:203
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\IdentityColumns::check() packages/sql-semantics-postgres/src/Rules/Table/Definition/IdentityColumns.php:41
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Qualifiers::derive() packages/sql-semantics-postgres/src/Rules/Table/Definition/Qualifiers.php:84
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Qualifiers::attributes() packages/sql-semantics-postgres/src/Rules/Table/Definition/Qualifiers.php:112
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Qualifiers::attributes() packages/sql-semantics-postgres/src/Rules/Table/Definition/Qualifiers.php:117
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Qualifiers::attributes() packages/sql-semantics-postgres/src/Rules/Table/Definition/Qualifiers.php:125
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Qualifiers::conflicts() packages/sql-semantics-postgres/src/Rules/Table/Definition/Qualifiers.php:142
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Qualifiers::conflicts() packages/sql-semantics-postgres/src/Rules/Table/Definition/Qualifiers.php:160
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\QueryTables::table() packages/sql-semantics-postgres/src/Rules/Table/Definition/QueryTables.php:83
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\QueryTables::table() packages/sql-semantics-postgres/src/Rules/Table/Definition/QueryTables.php:89
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Sequences::options() packages/sql-semantics-postgres/src/Rules/Table/Definition/Sequences.php:63
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Views::derive() packages/sql-semantics-postgres/src/Rules/Table/Definition/Views.php:45
- new SqlSemantics\Platform\PostgreSql\Rules\Table\ForeignKeys::derive() packages/sql-semantics-postgres/src/Rules/Table/ForeignKeys.php:74
- new SqlSemantics\Platform\PostgreSql\Rules\Table\ForeignKeys::derive() packages/sql-semantics-postgres/src/Rules/Table/ForeignKeys.php:78
- new SqlSemantics\Platform\PostgreSql\Rules\Table\KeyColumns::report() packages/sql-semantics-postgres/src/Rules/Table/KeyColumns.php:53
- new SqlSemantics\Platform\PostgreSql\Statement\Constraint\Column\Generated::deriveClause() packages/sql-semantics-postgres/src/Statement/Constraint/Column/Generated.php:65
- new SqlSemantics\Platform\PostgreSql\Statement\Constraint\CreateAssertion::deriveStatement() packages/sql-semantics-postgres/src/Statement/Constraint/CreateAssertion.php:54
- new SqlSemantics\Platform\PostgreSql\Statement\Table\Partition\HashBound::deriveClause() packages/sql-semantics-postgres/src/Statement/Table/Partition/HashBound.php:50
- new SqlSemantics\Platform\PostgreSql\Statement\Table\Partition\PartitionSpec::deriveClause() packages/sql-semantics-postgres/src/Statement/Table/Partition/PartitionSpec.php:55