classPublicationSchema
final class PublicationSchema
implements PublicationMember
uses Snapshot
Public API: explicitly declared with
@visibility public.The tables of a schema as an item of a publication: TABLES IN SCHEMA { name | CURRENT_SCHEMA }.
Mirrors PublicationObjSpec of type TABLES_IN_SCHEMA or TABLES_IN_CUR_SCHEMA. The schema is not part of a declaration context. Source: https://www.postgresql.org/docs/17/sql-createpublication.html.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE PUBLICATION p FOR TABLES IN SCHEMA CURRENT_SCHEMA, s');
[$operation->statement->objects[0]->schema, $operation->statement->objects[1]->schema?->value] // => [null, 's']Properties§
public Name|null $schemapublic bool $keywords = trueMethods§
public function __construct(public Name|null $schema, public bool $keywords = true)Parameters
$schema | Name|null | The schema; null for CURRENT_SCHEMA |
$keywords | bool | Whether TABLES IN SCHEMA is written |
public function introduced(): boolTells whether TABLES IN SCHEMA is written.
Returns
boolTest cases 1
public function render(Output $out): voidWrites the item.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 50
- method-call Output::name() line 57
- class-const NameUse::Column() line 57
Test cases 7§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 5
PublicationRuleTest::testObjectsReadsAContinuedSchemacallsPublicationListTest::testRuleOfAnIntroducedItemIsNullcallsAlterPublicationMembersTest::testRejectsABareTableAfterASchemacallsCreatePublicationTest::testRejectsASchemaNameThatWouldReadAsATablecallsCreatePublicationTest::testRejectsObjectsWithAllTablescalls
Relations§
Instantiated in 4
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\PublicationRule::object() packages/sql-semantics-postgres/src/Lowering/Catalog/PublicationRule.php:102
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\PublicationRule::object() packages/sql-semantics-postgres/src/Lowering/Catalog/PublicationRule.php:103
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\PublicationRule::object() packages/sql-semantics-postgres/src/Lowering/Catalog/PublicationRule.php:112
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\PublicationRule::continued() packages/sql-semantics-postgres/src/Lowering/Catalog/PublicationRule.php:126
Type checks 6
- instanceof SqlSemantics\Platform\PostgreSql\Lowering\Catalog\PublicationRule::continued() packages/sql-semantics-postgres/src/Lowering/Catalog/PublicationRule.php:125
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublicationList::check() packages/sql-semantics-postgres/src/Rules/Catalog/PublicationList.php:48
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublicationList::check() packages/sql-semantics-postgres/src/Rules/Catalog/PublicationList.php:49
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublicationList::check() packages/sql-semantics-postgres/src/Rules/Catalog/PublicationList.php:52
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublicationList::rule() packages/sql-semantics-postgres/src/Rules/Catalog/PublicationList.php:86
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublicationList::rule() packages/sql-semantics-postgres/src/Rules/Catalog/PublicationList.php:89