final class XmlProcessingInstruction
    implements Scalar, OutputNaming
    uses Snapshot
Public API: explicitly declared with @visibility public.

XMLPI (NAME target [, content]): an XML processing instruction.

Mirrors PostgreSQL's XmlExpr of kind IS_XMLPI. Rule: PG-XMLPI-001. Facts: xml; NULL exactly when the content is. The result column is named xmlpi. Source: https://www.postgresql.org/docs/17/functions-xml.html#FUNCTIONS-PRODUCING-XML-XMLPI. Status: Implemented.

Reading a processing instruction without contentdoctest
$pi = new \SqlSemantics\Platform\PostgreSql\Statement\Invocation\Xml\XmlProcessingInstruction(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('php'));
    [$pi->target->value, $pi->content] // => ['php', null]

Properties§

public Name $target
public Scalar|null $content = null

Methods§

public function __construct(public Name $target, public Scalar|null $content = null)

Parameters

$targetNameThe processing instruction target
$contentScalar|nullThe content
public function outputName(): Name

Names an unaliased result column.

Returns

Test cases 1
Calls 1
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFact

Derives the content, the type and the NULL fact.

Parameters

$derivationDerivation
$environmentEnvironment

Returns

Calls 6
public function render(Output $out): void

Writes XMLPI with the target and the content.

Parameters

$outOutput
Test cases 1
Calls 3

Test cases 3§

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

Dedicated tests 3

Relations§

Instantiated in 2