classXmlNamespace
final class XmlNamespace
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.One namespace of XMLNAMESPACES: a URI with its prefix, or the DEFAULT namespace.
Source: https://www.postgresql.org/docs/17/functions-xml.html#FUNCTIONS-XML-PROCESSING-XMLTABLE.
$namespace = new \SqlSemantics\Platform\PostgreSql\Statement\Relation\Xml\XmlNamespace(new \SqlSemantics\Platform\PostgreSql\Statement\Literal\Constant(new \SqlSemantics\Platform\PostgreSql\Statement\Literal\StringConstant('http://example.com')), new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('x'));
$namespace->prefix->value // => 'x'Properties§
public Scalar $uripublic Name|null $prefix = nullMethods§
public function __construct(public Scalar $uri, public Name|null $prefix = null)Parameters
$uri | Scalar | The namespace URI, an expression of the restricted form `b_expr` |
$prefix | Name|null | The prefix; null for the DEFAULT namespace |
Calls 3
- static-call Check::input() line 36
- method-call Precedence::restricted() line 36
- new Precedence line 36
public function render(Output $out): voidWrites the URI AS the prefix, or DEFAULT and the URI.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 45
- method-call Output::node() line 49
- class-const NameUse::Label() line 49
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
XmlNamespaceTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Lowering\Query\TableFunctionRule::namespaces() packages/sql-semantics-postgres/src/Lowering/Query/TableFunctionRule.php:98
- new SqlSemantics\Platform\PostgreSql\Lowering\Query\TableFunctionRule::namespaces() packages/sql-semantics-postgres/src/Lowering/Query/TableFunctionRule.php:99