classXmlRule
final class XmlRule
Lowers the SQL/XML functions.
Rule: PG-XML-LOWERING-001. Scope: the XML productions of func_expr_common_subexpr, xml_root_version, opt_xml_root_standalone, xml_attributes, xml_attribute_list, xml_attribute_el, xml_indent_option, xml_whitespace_option, xmlexists_argument, xml_passing_mech. Constructors: XmlConcat, XmlElement, XmlAttribute, XmlForest, XmlParse, XmlProcessingInstruction, XmlRoot, XmlSerialize, XmlExists, XmlPassing. BY REF and BY VALUE are accepted and ignored by the server (noise, see InvocationNoise). Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/functions-xml.html. Status: Implemented.
Methods§
Lowers an XML production of func_expr_common_subexpr.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 17
- new XmlConcat line 98
- method-call Form::node() line 98
- new XmlElement line 99
- method-call XmlRule::wrapped() line 100
- new XmlExists line 103
- method-call XmlRule::passing() line 103
- new XmlForest line 104
- method-call XmlRule::attributes() line 104
- new XmlParse line 105
- method-call XmlRule::option() line 108
- class-const XmlRule::WHITESPACE() line 108
- new XmlProcessingInstruction line 110
- method-call XmlRule::root() line 112
- new XmlSerialize line 113
- new TypeName line 116
- class-const XmlRule::INDENT() line 117
- static-call ImplementationGap::production() line 119
Lowers the XMLROOT production.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 5
- method-call Form::node() line 130
- static-call ImplementationGap::production() line 135
- new XmlRoot line 138
- method-call XmlRule::option() line 138
- class-const XmlRule::STANDALONE() line 138
public function option<T>(array<string, T> $table, Node $option): TAnswers the option a production of a closed table selects.
Parameters
$table | array<string, T> | |
$option | Node |
Returns
TThrows
ImplementationGap When the production has no ruleTest cases 1
Called from 4
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\XmlRule::expression() packages/sql-semantics-postgres/src/Lowering/Invocation/XmlRule.php:108
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\XmlRule::expression() packages/sql-semantics-postgres/src/Lowering/Invocation/XmlRule.php:117
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\XmlRule::root() packages/sql-semantics-postgres/src/Lowering/Invocation/XmlRule.php:138
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\XmlRule::passing() packages/sql-semantics-postgres/src/Lowering/Invocation/XmlRule.php:212
Calls 2
- function-call
array_key_existsline 155 - static-call ImplementationGap::production() line 156
public function wrapped(Node $attributes): list<XmlAttribute>Lowers xml_attributes.
Parameters
$attributes | Node |
Returns
list<XmlAttribute>Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\XmlRule::expression() packages/sql-semantics-postgres/src/Lowering/Invocation/XmlRule.php:100
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\XmlRule::expression() packages/sql-semantics-postgres/src/Lowering/Invocation/XmlRule.php:102
Calls 2
- static-call ImplementationGap::production() line 173
- method-call XmlRule::attributes() line 176
public function attributes(Node $list): list<XmlAttribute>Lowers xml_attribute_list.
Parameters
$list | Node |
Returns
list<XmlAttribute>Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 3
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\Invocations::xmlAttributes() packages/sql-semantics-postgres/src/Lowering/Invocation/Invocations.php:133
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\XmlRule::expression() packages/sql-semantics-postgres/src/Lowering/Invocation/XmlRule.php:104
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\XmlRule::wrapped() packages/sql-semantics-postgres/src/Lowering/Invocation/XmlRule.php:176
Calls 3
- method-call Lowering::items() line 189
- new XmlAttribute line 192
- static-call ImplementationGap::production() line 194
public function passing(Node $argument): XmlPassingLowers xmlexists_argument.
Parameters
$argument | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\Invocations::xmlPassing() packages/sql-semantics-postgres/src/Lowering/Invocation/Invocations.php:123
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\XmlRule::expression() packages/sql-semantics-postgres/src/Lowering/Invocation/XmlRule.php:103
Calls 6
- class-const XmlRule::PASSING() line 209
- static-call ImplementationGap::production() line 209
- method-call XmlRule::option() line 212
- function-call
array_fill_keysline 212 - class-const XmlRule::MECHANISMS() line 212
- new XmlPassing line 216
Private surface 6§
Implementation details, listed for orientation only.
private const STANDALONE = ['opt_xml_root_standalone:' => null, 'opt_xml_root_standalone: , STANDALONE_P Y…private const INDENT = ['xml_indent_option:' => null, 'xml_indent_option: INDENT' => \SqlSemantics\Pla…private const WHITESPACE = ['xml_whitespace_option:' => null, 'xml_whitespace_option: PRESERVE WHITESPACE_…private const PASSING = ['xmlexists_argument: PASSING c_expr' => 1, 'xmlexists_argument: PASSING c_expr…private const MECHANISMS = ['xml_passing_mech: BY REF_P', 'xml_passing_mech: BY VALUE_P']private Lowering $loweringTest cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Relations§
Instantiated in 3
- new SqlSemantics\Platform\PostgreSql\Lowering\Invocation\Invocations::xmlPassing() packages/sql-semantics-postgres/src/Lowering/Invocation/Invocations.php:123
- new SqlSemantics\Platform\PostgreSql\Lowering\Invocation\Invocations::xmlAttributes() packages/sql-semantics-postgres/src/Lowering/Invocation/Invocations.php:133
- new SqlSemantics\Platform\PostgreSql\Lowering\Invocation\SyntaxRule::subexpression() packages/sql-semantics-postgres/src/Lowering/Invocation/SyntaxRule.php:93
Method calls 3
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\Invocations::xmlPassing() packages/sql-semantics-postgres/src/Lowering/Invocation/Invocations.php:123
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\Invocations::xmlAttributes() packages/sql-semantics-postgres/src/Lowering/Invocation/Invocations.php:133
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\SyntaxRule::subexpression() packages/sql-semantics-postgres/src/Lowering/Invocation/SyntaxRule.php:93