classExtensionRule
final class ExtensionRule
Lowers the extension, language and access method commands.
Rule: PG-EXTENSION-LOWER-001. Scope: CreateExtensionStmt, create_extension_opt_list, create_extension_opt_item, AlterExtensionStmt, alter_extension_opt_list, alter_extension_opt_item, AlterExtensionContentsStmt, CreatePLangStmt, handler_name, opt_inline_handler, validator_clause, opt_validator, CreateAmStmt, am_type. Constructors: CreateExtension, ExtensionSchema, ExtensionVersion, UpdateExtension, AlterExtensionContents, CreateLanguage, CreateLanguageExtension, FunctionClause, CreateAccessMethod. The objects of ALTER EXTENSION use the object references of the routine family. Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-createextension.html, https://www.postgresql.org/docs/17/sql-alterextension.html, https://www.postgresql.org/docs/17/sql-createlanguage.html, https://www.postgresql.org/docs/17/sql-create-access-method.html. Status: Implemented.
Methods§
Lowers an extension, language or access method command.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 15
- method-call ExtensionRule::contents() line 91
- new CreateExtension line 95
- method-call ExtensionRule::options() line 95
- new UpdateExtension line 97
- method-call ExtensionRule::versions() line 97
- new CreateLanguageExtension line 98
- method-call CatalogFlags::present() line 98
- new CatalogFlags line 98
- new CreateLanguage line 99
- method-call ExtensionRule::handler() line 103
- method-call ExtensionRule::inline() line 104
- method-call ExtensionRule::validator() line 105
- new CreateAccessMethod line 107
- method-call ExtensionRule::accessMethodKind() line 107
- static-call ImplementationGap::production() line 108
public function contents(Form $form): AlterExtensionContentsLowers AlterExtensionContentsStmt.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 9
- method-call Form::node() line 119
- new AlterExtensionContents line 124
- new UnqualifiedName line 124
- class-const ExtensionRule::KINDS() line 129
- static-call ImplementationGap::production() line 129
- new CastPair line 132
- new TypeReference line 134
- new OperatorGroupName line 137
- new TransformFor line 138
public function options(Node $list): list<ExtensionOption>Lowers create_extension_opt_list.
Parameters
$list | Node |
Returns
list<ExtensionOption>Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ExtensionRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ExtensionRule.php:95
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ExtensionRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ExtensionRule.php:96
Calls 7
- method-call Lowering::items() line 157
- new ExtensionSchema line 160
- new ExtensionVersion line 161
- class-const VersionRole::Target() line 161
- class-const VersionRole::Source() line 162
- class-const ExtensionCascade::Cascade() line 163
- static-call ImplementationGap::production() line 164
public function versions(Node $list): list<Word|StringConstant>Lowers alter_extension_opt_list: the versions written after TO.
Parameters
$list | Node |
Returns
list<Word|StringConstant>Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 2
- method-call Lowering::items() line 181
- static-call ImplementationGap::production() line 183
public function handler(Node $name): DottedNameLowers handler_name.
Parameters
$name | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 5
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ExtensionRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ExtensionRule.php:103
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ExtensionRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ExtensionRule.php:107
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ExtensionRule::inline() packages/sql-semantics-postgres/src/Lowering/Catalog/ExtensionRule.php:215
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ExtensionRule::validator() packages/sql-semantics-postgres/src/Lowering/Catalog/ExtensionRule.php:233
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::functions() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:113
Calls 2
- new DottedName line 199
- static-call ImplementationGap::production() line 201
public function inline(Node $handler): ?DottedNameLowers opt_inline_handler; none is null.
Parameters
$handler | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 2
- method-call ExtensionRule::handler() line 215
- static-call ImplementationGap::production() line 217
public function validator(Node $validator): ?FunctionClauseLowers opt_validator or validator_clause; none is null.
Parameters
$validator | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ExtensionRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ExtensionRule.php:105
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ExtensionRule::validator() packages/sql-semantics-postgres/src/Lowering/Catalog/ExtensionRule.php:231
Calls 5
- method-call ExtensionRule::validator() line 231
- new FunctionClause line 233
- class-const FunctionRole::Validator() line 233
- method-call ExtensionRule::handler() line 233
- static-call ImplementationGap::production() line 235
public function accessMethodKind(Node $kind): AccessMethodKindLowers am_type.
Parameters
$kind | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 3
- class-const AccessMethodKind::Index() line 249
- class-const AccessMethodKind::Table() line 250
- static-call ImplementationGap::production() line 251
Private surface 2§
Implementation details, listed for orientation only.
private const KINDS = ['AlterExtensionContentsStmt: ALTER EXTENSION name add_drop AGGREGATE aggregate…private Lowering $loweringTest cases 6§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
ExtensionRuleTest::testAccessMethodKindOfAnIndexMethodcallsExtensionRuleTest::testHandlerLowersADottedNamecallsExtensionRuleTest::testInlineOfNoHandlercallsExtensionRuleTest::testOptionsLowersEveryItemcallsExtensionRuleTest::testValidatorOfTheNoFormcallsExtensionRuleTest::testVersionsLowersEveryTocalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\Catalogs::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/Catalogs.php:64
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::functions() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:113
Method calls 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\Catalogs::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/Catalogs.php:64
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::functions() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:113