final class SpatialAttribute
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

One attribute of CREATE SPATIAL REFERENCE SYSTEM: NAME 'text', DEFINITION 'text', ORGANIZATION 'text' IDENTIFIED BY id, DESCRIPTION 'text'.

The text is a quoted string without a line feed. ORGANIZATION also names the identifier the organization gives the system. Source: https://dev.mysql.com/doc/refman/8.4/en/create-spatial-reference-system.html.

Holding an organization attributedoctest
$attribute = new \SqlSemantics\Platform\MySql\Statement\Server\Spatial\SpatialAttribute(\SqlSemantics\Platform\MySql\Statement\Server\Spatial\SpatialAttributeKind::Organization, new \SqlSemantics\Platform\MySql\Statement\Literal\Text('EPSG'), new \SqlSemantics\Platform\MySql\Statement\Literal\Numeral('4326'));
    [$attribute->value->value, $attribute->identifier?->text] // => ['EPSG', '4326']

Properties§

public Text $value
public Numeral|null $identifier = null

Methods§

public function __construct(
    public SpatialAttributeKind $kind,
    public Text $value,
    public Numeral|null $identifier = null,
)

Parameters

$kindSpatialAttributeKindThe attribute
$valueTextThe text of the attribute
$identifierNumeral|nullThe identifier of IDENTIFIED BY; written exactly for ORGANIZATION

Throws

InvalidConstruction When the identifier is written for another attribute or missing for ORGANIZATION
Calls 2
public function render(Output $out): void

Writes the attribute.

Parameters

$outOutput
Calls 1

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 1
Constant reads 1
Type declarations 1