final class MemberName
    implements ObjectReference
    uses Snapshot
Public API: explicitly declared with @visibility public.

An object named within the table or domain it belongs to: name ON table or name ON DOMAIN domain.

Policies, rules, triggers and table constraints are named per table, and domain constraints per domain. DROP and COMMENT write the owner as a dotted name of any length, ALTER ... RENAME and DEPENDS ON EXTENSION as a relation name of at most three parts; the form is kept. Source: https://www.postgresql.org/docs/17/sql-droptrigger.html, https://www.postgresql.org/docs/17/sql-comment.html.

Reading a trigger of a tabledoctest
$member = new \SqlSemantics\Platform\PostgreSql\Statement\Object\Reference\MemberName(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('audit'), new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\QualifiedName(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('orders')));
    [$member->name->value, $member->table()?->name->value] // => ['audit', 'orders']

Properties§

public Name $name
public bool $domain = false

Methods§

public function __construct(
    public Name $name,
    public DottedName|QualifiedName $owner,
    public bool $domain = false,
)

Parameters

$nameNameThe object name
$ownerDottedName|QualifiedNameThe table or domain the object belongs to
$domainboolWhether the owner is a domain, written ON DOMAIN
public function table(): ?QualifiedName

Answers the owning table as a relation name, or null when the owner is a domain or has more than three parts.

Test cases 1
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives nothing: names hold no expression.

Parameters

$derivationDerivation
$environmentEnvironment
Test cases 1
public function render(Output $out): void

Writes the name, ON, DOMAIN when the owner is a domain, and the owner.

Parameters

$outOutput
Test cases 1
Calls 6

Test cases 6§

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

Dedicated tests 3
Other tests reaching this symbol 3

Relations§

Instantiated in 4
Type checks 2