classPublicationRule
final class PublicationRule
Lowers the publication commands.
Rule: PG-PUBLICATION-LOWER-001. Scope: CreatePublicationStmt, PublicationObjSpec, pub_obj_list, AlterPublicationStmt. Constructors: CreatePublication, AlterPublicationOptions, AlterPublicationMembers, PublicationTable, PublicationSchema. An item without keywords is read with the kind of the item before it, as PG-PUBLICATION-LIST-001 states: a bare name after a schema is a schema, otherwise a table. A table name with an indirection takes field selections only, at most three parts. Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-createpublication.html, https://www.postgresql.org/docs/17/sql-alterpublication.html. Status: Implemented.
Methods§
Lowers a publication command.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 8
- new CreatePublication line 61
- method-call PublicationRule::objects() line 63
- new AlterPublicationOptions line 64
- new AlterPublicationMembers line 65
- class-const PublicationAction::Add() line 65
- class-const PublicationAction::Set() line 66
- class-const PublicationAction::Drop() line 67
- static-call ImplementationGap::production() line 68
public function objects(Node $list): list<PublicationMember>Lowers pub_obj_list, reading each item without keywords with the kind of the item before it.
Parameters
$list | Node |
Returns
list<PublicationMember>Test cases 1
Called from 4
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\PublicationRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/PublicationRule.php:63
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\PublicationRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/PublicationRule.php:65
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\PublicationRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/PublicationRule.php:66
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\PublicationRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/PublicationRule.php:67
Calls 2
- method-call Lowering::items() line 81
- method-call PublicationRule::object() line 82
public function object(Form $form, ?PublicationMember $previous): PublicationMemberLowers one PublicationObjSpec after the item before it.
Parameters
$form | Form | |
$previous | ?PublicationMember |
Returns
Throws
AnalysisException When a table name has a subscript or more than three parts, which `makeRangeVarFromQualifiedName` called by the action of `PublicationObjSpec` in `gram.y` rejectsImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 10
- new PublicationTable line 101
- method-call Form::node() line 101
- method-call PublicationRule::star() line 101
- new PublicationSchema line 102
- method-call PublicationRule::continued() line 104
- new RelationReference line 106
- method-call DottedName::qualified() line 106
- new DottedName line 106
- new AnalysisException line 106
- static-call ImplementationGap::production() line 113
public function continued(Form $form, ?PublicationMember $previous): PublicationMemberLowers a bare name item: a schema after a schema item when it has no column list or row filter, otherwise a table.
Parameters
$form | Form | |
$previous | ?PublicationMember |
Returns
Test cases 1
Called from 1
Calls 5
- method-call Form::node() line 122
- new PublicationSchema line 126
- new PublicationTable line 129
- new RelationReference line 129
- new QualifiedName line 129
public function star(Node $relation): boolTells whether a relation_expr or extended_relation_expr ends with the star that names the descendants explicitly.
Parameters
$relation | Node |
Returns
boolTest cases 1
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\PublicationRule::object() packages/sql-semantics-postgres/src/Lowering/Catalog/PublicationRule.php:101
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\PublicationRule::object() packages/sql-semantics-postgres/src/Lowering/Catalog/PublicationRule.php:111
Calls 1
- function-call
countline 138
Private surface 1§
Implementation details, listed for orientation only.
private Lowering $loweringTest cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.