final class DatabaseRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql\Lowering". Code outside that scope must not name this declaration.

Lowers the database and tablespace commands.

Rule: PG-DATABASE-LOWER-001. Scope: CreatedbStmt, createdb_opt_list, createdb_opt_items, createdb_opt_item, createdb_opt_name, opt_equal, AlterDatabaseStmt, AlterDatabaseSetStmt, DropdbStmt, drop_option_list, drop_option, CreateTableSpaceStmt, OptTableSpaceOwner, DropTableSpaceStmt, AlterTblSpcStmt. Constructors: CreateDatabase, AlterDatabase, MoveDatabase, RefreshDatabaseCollation, AlterDatabaseSetting, DropDatabase, DatabaseOption, CreateTablespace, DropTablespace, AlterTablespaceOptions. The optional = of a database option and the optional WITH before database options are noise (CatalogNoise). Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-createdatabase.html, https://www.postgresql.org/docs/17/sql-alterdatabase.html, https://www.postgresql.org/docs/17/sql-dropdatabase.html, https://www.postgresql.org/docs/17/sql-createtablespace.html, https://www.postgresql.org/docs/17/sql-altertablespace.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function equal(Node $equal): void
public function owner(Node $owner): ?RoleSpec

Lowers OptTableSpaceOwner; no owner is null.

Parameters

$ownerNode

Returns

Throws

ImplementationGap When the production has no rule
Test cases 1
Called from 1
Calls 1

Private surface 2§

Implementation details, listed for orientation only.

private const KEYWORDS = ['createdb_opt_name: CONNECTION LIMIT' => \SqlSemantics\Platform\PostgreSql\Sta…
private Lowering $lowering

Test cases 5§

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

Dedicated tests 5

Relations§

Instantiated in 1
Method calls 1