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.

Naming the result columndoctest
$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 $path
public XmlPassing $passing

Methods§

public function __construct(public Scalar $path, public XmlPassing $passing)

Parameters

$pathScalarThe XPath expression
$passingXmlPassingThe document
Calls 3
public function outputName(): Name

Names an unaliased result column after the function the server calls.

Returns

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

Derives the path and the document and the result of pg_catalog.xmlexists.

Parameters

$derivationDerivation
$environmentEnvironment

Returns

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

Writes XMLEXISTS with the path and the PASSING clause.

Parameters

$outOutput
Test cases 1
Calls 1

Test cases 4§

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

Dedicated tests 4

Relations§

Instantiated in 1