interface SchemaElement
    extends Statement
Public API: explicitly declared with @visibility public.

A statement that CREATE SCHEMA may contain: CREATE TABLE, CREATE INDEX, CREATE SEQUENCE, CREATE TRIGGER or CREATE VIEW.

Inside CREATE SCHEMA, an unqualified object (or the unqualified table of CREATE INDEX and CREATE TRIGGER) belongs to the schema being created; a different written schema is an error the containing statement reports. Source: https://www.postgresql.org/docs/17/sql-createschema.html.

Reading the schema written on an elementdoctest
$create = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TABLE s.t (a int)');
    $create->statement->createdSchema()?->value // => 's'

Methods§

public function createdSchema(): ?Name

Answers the schema written on the created object (on the table, for an index or a trigger), or null when it is unqualified.

Returns

public function deriveElement(Derivation $derivation, Name $schema): void

Derives the statement as an element of CREATE SCHEMA: an unqualified object is in the given schema.

Parameters

$derivationDerivation
$schemaName

Test cases 6§

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

Dedicated tests 1
Other tests reaching this symbol 5

Relations§

Implemented by 6
Type checks 3