classSecurityLabel
final class SecurityLabel
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.SECURITY LABEL [FOR provider] ON kind object IS 'label' | NULL: sets or removes a security label.
Mirrors PostgreSQL's SecLabelStmt. Without a provider the only loaded label provider is used. A labelled relation or column is resolved. Source: https://www.postgresql.org/docs/17/sql-security-label.html.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze("SECURITY LABEL FOR selinux ON SCHEMA app IS 'x'");
$operation->statement->provider?->word->value // => 'selinux'Properties§
public ObjectKind $kindpublic ObjectReference $objectpublic StringConstant|null $labelpublic Word|StringConstant|null $provider = nullMethods§
public function __construct(
public ObjectKind $kind,
public ObjectReference $object,
public StringConstant|null $label,
public Word|StringConstant|null $provider = null,
)Parameters
$kind | ObjectKind | The kind of the object |
$object | ObjectReference | The object, named as SECURITY LABEL names objects of the kind |
$label | StringConstant|null | The label; null for NULL |
$provider | Word|StringConstant|null | The label provider, if written |
Calls 5
- new ObjectForms line 48
- static-call Check::input() line 49
- function-call
in_arrayline 49 - method-call ObjectForms::form() line 49
- method-call ObjectForms::label() line 49
public function deriveStatement(Derivation $derivation): voidDerives the object.
Parameters
$derivation | Derivation |
Calls 2
- method-call ObjectFacts::derive() line 57
- new ObjectFacts line 57
public function render(Output $out): voidWrites the statement.
Parameters
$out | Output |
Calls 4
- method-call Output::keyword() line 65
- method-call ObjectSpelling::kind() line 70
- new ObjectSpelling line 70
- method-call Output::node() line 71
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.