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

One column of XMLTABLE: a typed column with its options, or the FOR ORDINALITY column.

Mirrors PostgreSQL's RangeTableFuncCol. Source: https://www.postgresql.org/docs/17/functions-xml.html#FUNCTIONS-XML-PROCESSING-XMLTABLE.

Reading an ordinality columndoctest
(new \SqlSemantics\Platform\PostgreSql\Statement\Relation\Xml\XmlTableColumn(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('n')))->ordinality() // => true

Properties§

public list<XmlColumnOption> $options
public Name $name
public TypeName|null $type = null

Methods§

public function __construct(
    public Name $name,
    public TypeName|null $type = null,
    list<XmlColumnOption> $options = [],
)

Parameters

$nameNameThe column name
$typeTypeName|nullThe column type; null for FOR ORDINALITY
$optionslist<XmlColumnOption>The options in written order
Calls 3
public function ordinality(): bool

Tells whether the column numbers the rows.

Returns

bool
Test cases 1
public function render(Output $out): void

Writes the name and FOR ORDINALITY, or the type and the options.

Parameters

$outOutput
Calls 4

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 3
Constant reads 1
Type declarations 1