classXmlProcessingInstruction
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.
$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 $targetpublic Scalar|null $content = nullMethods§
public function __construct(public Name $target, public Scalar|null $content = null)Parameters
$target | Name | The processing instruction target |
$content | Scalar|null | The content |
public function outputName(): NameNames an unaliased result column.
Returns
Test cases 1
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFactDerives the content, the type and the NULL fact.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 6
- new ScalarFact line 60
- new Known line 60
- class-const Builtin::Xml() line 60
- class-const Nullability::NotNull() line 60
- method-call Derivation::scalar() line 62
- class-const Nullability::Nullable() line 64
public function render(Output $out): voidWrites XMLPI with the target and the content.
Parameters
$out | Output |
Test cases 1
Calls 3
- method-call Output::keyword() line 72
- class-const NameUse::Label() line 72
- method-call Output::symbol() line 74
Test cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Lowering\Invocation\XmlRule::expression() packages/sql-semantics-postgres/src/Lowering/Invocation/XmlRule.php:110
- new SqlSemantics\Platform\PostgreSql\Lowering\Invocation\XmlRule::expression() packages/sql-semantics-postgres/src/Lowering/Invocation/XmlRule.php:111