classForeignDataRule
final class ForeignDataRule
Lowers the foreign-data commands.
Rule: PG-FOREIGN-LOWER-001. Scope: CreateFdwStmt, AlterFdwStmt, fdw_option, fdw_options, opt_fdw_options, CreateForeignServerStmt, opt_type, foreign_server_version, opt_foreign_server_version, AlterForeignServerStmt, CreateUserMappingStmt, auth_ident, DropUserMappingStmt, AlterUserMappingStmt, ImportForeignSchemaStmt, import_qualification_type, import_qualification. Constructors: the classes of Statement\ForeignData and FunctionClause. Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-createforeigndatawrapper.html, https://www.postgresql.org/docs/17/sql-createserver.html, https://www.postgresql.org/docs/17/sql-createusermapping.html, https://www.postgresql.org/docs/17/sql-importforeignschema.html. Status: Implemented.
Methods§
Lowers a foreign-data command.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 14
- new CreateFdw line 76
- method-call ForeignDataRule::functions() line 76
- new AlterFdw line 77
- new CreateForeignServer line 79
- method-call ForeignDataRule::type() line 79
- method-call ForeignDataRule::version() line 79
- new AlterForeignServer line 81
- new CreateUserMapping line 84
- method-call ForeignDataRule::user() line 84
- new DropUserMapping line 86
- new AlterUserMapping line 88
- new ImportForeignSchema line 89
- method-call ForeignDataRule::restriction() line 89
- static-call ImplementationGap::production() line 90
public function functions(Node $list): list<FunctionClause>Lowers opt_fdw_options or fdw_options.
Parameters
$list | Node |
Returns
list<FunctionClause>Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 3
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:76
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:77
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:78
Calls 6
- method-call Lowering::items() line 106
- class-const ForeignDataRule::FUNCTIONS() line 112
- static-call ImplementationGap::production() line 112
- new FunctionClause line 113
- method-call ExtensionRule::handler() line 113
- new ExtensionRule line 113
public function type(Node $type): ?StringConstantLowers opt_type; none is null.
Parameters
$type | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:79
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:80
Calls 1
- static-call ImplementationGap::production() line 131
public function version(Node $version): ?ServerVersionLowers opt_foreign_server_version or foreign_server_version; none is null.
Parameters
$version | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 5
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:79
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:80
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:81
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:82
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::version() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:145
Calls 3
- method-call ForeignDataRule::version() line 145
- new ServerVersion line 147
- static-call ImplementationGap::production() line 149
public function user(Node $user): RoleSpec|MappingUserLowers auth_ident.
Parameters
$user | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 5
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:84
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:85
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:86
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:87
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:88
Calls 2
- class-const MappingUser::User() line 164
- static-call ImplementationGap::production() line 165
public function restriction(Node $restriction): ?ImportRestrictionLowers import_qualification; none is null.
Parameters
$restriction | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 4
- static-call ImplementationGap::production() line 181
- class-const ImportRestrictionKind::LimitTo() line 185
- class-const ImportRestrictionKind::Except() line 186
- new ImportRestriction line 190
Private surface 2§
Implementation details, listed for orientation only.
private const FUNCTIONS = ['fdw_option: HANDLER handler_name' => [\SqlSemantics\Platform\PostgreSql\State…private Lowering $loweringTest cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.