classCreateFdw
final class CreateFdw
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.A request to define a foreign-data wrapper.
Rule: PG-FDW-001. Mirrors CreateFdwStmt: name, handler and validator clauses in the order written, and options. A handler or validator named twice is a diagnostic (PG-FOREIGN-OPTION-001). Source: https://www.postgresql.org/docs/17/sql-createforeigndatawrapper.html. Status: Implemented.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze("CREATE FOREIGN DATA WRAPPER w HANDLER h NO VALIDATOR OPTIONS (debug 'true')");
[$operation->statement->functions[0]->function?->last()->value, $operation->toString()] // => ['h', "CREATE FOREIGN DATA WRAPPER w HANDLER h NO VALIDATOR OPTIONS (debug 'true')"]Properties§
public list<FunctionClause> $functionspublic list<GenericOption> $optionspublic Name $nameMethods§
public function __construct(
public Name $name,
list<FunctionClause> $functions = [],
list<GenericOption> $options = [],
)Parameters
$name | Name | The wrapper name |
$functions | list<FunctionClause> | The handler and validator clauses in the order written |
$options | list<GenericOption> | The options |
Calls 3
- static-call Check::listOf() line 52
- class-const FunctionClause::class() line 52
- class-const GenericOption::class() line 53
public function deriveStatement(Derivation $derivation): voidReports a function role named twice.
Parameters
$derivation | Derivation |
Calls 2
- method-call ForeignOptions::functions() line 61
- new ForeignOptions line 61
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 5
- method-call Output::keyword() line 69
- class-const NameUse::Column() line 69
- method-call Output::node() line 71
- method-call ForeignOptions::write() line 73
- new ForeignOptions line 73
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
CreateFdwTestcalls