classXmlExists
final class XmlExists
implements Scalar, OutputNaming
uses Snapshot
Public API: explicitly declared with
@visibility public.XMLEXISTS (path PASSING document): whether an XPath expression returns any node.
The server calls pg_catalog.xmlexists(path, document); the path is a primary expression (c_expr). Rule: PG-XMLEXISTS-001. Facts: those of the call (PG-CALL-RESULT-001; boolean). The result column is named xmlexists. Source: https://www.postgresql.org/docs/17/functions-xml.html#FUNCTIONS-XML-PREDICATES-XMLEXISTS. Status: Implemented.
$exists = new \SqlSemantics\Platform\PostgreSql\Statement\Invocation\Xml\XmlExists(new \SqlSemantics\Platform\PostgreSql\Statement\Literal\NullLiteral(), new \SqlSemantics\Platform\PostgreSql\Statement\Invocation\Xml\XmlPassing(new \SqlSemantics\Platform\PostgreSql\Statement\Literal\NullLiteral()));
$exists->outputName()->value // => 'xmlexists'Properties§
public Scalar $pathpublic XmlPassing $passingMethods§
public function __construct(public Scalar $path, public XmlPassing $passing)Parameters
$path | Scalar | The XPath expression |
$passing | XmlPassing | The document |
Calls 3
- static-call Check::input() line 43
- method-call Precedence::primary() line 43
- new Precedence line 43
public function outputName(): NameNames an unaliased result column after the function the server calls.
Returns
Test cases 1
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFactDerives the path and the document and the result of pg_catalog.xmlexists.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 3
- method-call Derivation::scalar() line 59
- method-call CallTyping::catalog() line 62
- new CallTyping line 62
public function render(Output $out): voidWrites XMLEXISTS with the path and the PASSING clause.
Parameters
$out | Output |
Test cases 1
Calls 1
- method-call Output::keyword() line 70
Test cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.