classXmlColumnOption
final class XmlColumnOption
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.One option of an XMLTABLE column: its path, its default, or whether it can be NULL.
Mirrors the DefElem options PostgreSQL's grammar builds for xmltable_column_option_el. Source: https://www.postgresql.org/docs/17/functions-xml.html#FUNCTIONS-XML-PROCESSING-XMLTABLE.
$option = new \SqlSemantics\Platform\PostgreSql\Statement\Relation\Xml\XmlColumnOption(\SqlSemantics\Platform\PostgreSql\Statement\Relation\Xml\XmlColumnOptionKind::Named, new \SqlSemantics\Platform\PostgreSql\Statement\Literal\Constant(new \SqlSemantics\Platform\PostgreSql\Statement\Literal\StringConstant('a')), new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('path'));
$option->word->value // => 'path'new \SqlSemantics\Platform\PostgreSql\Statement\Relation\Xml\XmlColumnOption(\SqlSemantics\Platform\PostgreSql\Statement\Relation\Xml\XmlColumnOptionKind::NotNull, new \SqlSemantics\Platform\PostgreSql\Statement\Literal\NullLiteral()) // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\InvalidConstructionProperties§
public XmlColumnOptionKind $kindpublic Scalar|null $value = nullpublic Name|null $word = nullMethods§
public function __construct(
public XmlColumnOptionKind $kind,
public Scalar|null $value = null,
public Name|null $word = null,
)Parameters
$kind | XmlColumnOptionKind | The option |
$value | Scalar|null | The value of PATH, DEFAULT or a named option, an expression of the restricted form `b_expr` |
$word | Name|null | The identifier a named option is written with |
Calls 5
- static-call Check::input() line 41
- method-call XmlColumnOptionKind::valued() line 41
- class-const XmlColumnOptionKind::Named() line 42
- method-call Precedence::restricted() line 43
- new Precedence line 43
public function render(Output $out): voidWrites the option.
Parameters
$out | Output |
Calls 5
- method-call Output::name() line 52
- class-const NameUse::Identifier() line 52
- method-call Output::keyword() line 54
- function-call
explodeline 54 - method-call Output::node() line 56
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
XmlColumnOptionTestcalls
Other tests reaching this symbol 1
Relations§
Instantiated in 5
- new SqlSemantics\Platform\PostgreSql\Lowering\Query\TableFunctionRule::options() packages/sql-semantics-postgres/src/Lowering/Query/TableFunctionRule.php:144
- new SqlSemantics\Platform\PostgreSql\Lowering\Query\TableFunctionRule::options() packages/sql-semantics-postgres/src/Lowering/Query/TableFunctionRule.php:145
- new SqlSemantics\Platform\PostgreSql\Lowering\Query\TableFunctionRule::options() packages/sql-semantics-postgres/src/Lowering/Query/TableFunctionRule.php:146
- new SqlSemantics\Platform\PostgreSql\Lowering\Query\TableFunctionRule::options() packages/sql-semantics-postgres/src/Lowering/Query/TableFunctionRule.php:147
- new SqlSemantics\Platform\PostgreSql\Lowering\Query\TableFunctionRule::options() packages/sql-semantics-postgres/src/Lowering/Query/TableFunctionRule.php:148