classSpatialProblem
final class SpatialProblem
implements Diagnostic
uses Snapshot
Public API: explicitly declared with
@visibility public.A spatial reference system statement that breaks a rule the server checks while it parses it.
The server rejects the statement with the error of the rule. Source: https://dev.mysql.com/doc/refman/8.4/en/create-spatial-reference-system.html.
(new \SqlSemantics\Platform\MySql\Statement\Server\Problem\SpatialProblem(\SqlSemantics\Platform\MySql\Statement\Server\Problem\SpatialRule::MissingAttribute, \SqlSemantics\Platform\MySql\Statement\Server\Spatial\SpatialAttributeKind::Definition))->message() // => 'Missing mandatory attribute DEFINITION (ER_SRS_MISSING_MANDATORY_ATTRIBUTE).'Properties§
public SpatialRule $rulepublic SpatialAttributeKind|null $attribute = nullMethods§
public function __construct(
public SpatialRule $rule,
public SpatialAttributeKind|null $attribute = null,
)Parameters
$rule | SpatialRule | The broken rule |
$attribute | SpatialAttributeKind|null | The attribute the rule concerns; null for the identifier of the system |
public function message(): stringDescribes the problem.
Returns
stringTest cases 1
Calls 8
- class-const SpatialRule::IdentifierOutOfRange() line 40
- class-const SpatialRule::IdentifierZero() line 41
- class-const SpatialRule::RepeatedAttribute() line 42
- class-const SpatialRule::MissingAttribute() line 43
- class-const SpatialRule::BlankName() line 44
- class-const SpatialRule::BlankOrganization() line 45
- class-const SpatialRule::ControlCharacter() line 46
- class-const SpatialRule::TooLong() line 47
Test cases 6§
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 5
SpatialChecksTest::testAttributeReportsBlankControlAndLongValuescallsSpatialChecksTest::testAttributesReportsRepeatedAndMissingAttributescallsSpatialChecksTest::testSridReportsAnIdentifierOutOfRangecallsCreateSpatialReferenceTest::testDeriveStatementReportsAMissingAttributecallsDropSpatialReferenceTest::testDeriveStatementReportsIdentifierZerocalls
Relations§
Instantiated in 9
- new SqlSemantics\Platform\MySql\Rules\Server\SpatialChecks::srid() packages/sql-semantics-mysql/src/Rules/Server/SpatialChecks.php:49
- new SqlSemantics\Platform\MySql\Rules\Server\SpatialChecks::srid() packages/sql-semantics-mysql/src/Rules/Server/SpatialChecks.php:51
- new SqlSemantics\Platform\MySql\Rules\Server\SpatialChecks::attributes() packages/sql-semantics-mysql/src/Rules/Server/SpatialChecks.php:65
- new SqlSemantics\Platform\MySql\Rules\Server\SpatialChecks::attributes() packages/sql-semantics-mysql/src/Rules/Server/SpatialChecks.php:72
- new SqlSemantics\Platform\MySql\Rules\Server\SpatialChecks::attribute() packages/sql-semantics-mysql/src/Rules/Server/SpatialChecks.php:85
- new SqlSemantics\Platform\MySql\Rules\Server\SpatialChecks::attribute() packages/sql-semantics-mysql/src/Rules/Server/SpatialChecks.php:88
- new SqlSemantics\Platform\MySql\Rules\Server\SpatialChecks::attribute() packages/sql-semantics-mysql/src/Rules/Server/SpatialChecks.php:91
- new SqlSemantics\Platform\MySql\Rules\Server\SpatialChecks::attribute() packages/sql-semantics-mysql/src/Rules/Server/SpatialChecks.php:94
- new SqlSemantics\Platform\MySql\Rules\Server\SpatialChecks::attribute() packages/sql-semantics-mysql/src/Rules/Server/SpatialChecks.php:98