classDropUserMapping
final class DropUserMapping
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.A request to remove a user mapping.
Rule: PG-USER-MAPPING-003. Mirrors DropUserMappingStmt. Source: https://www.postgresql.org/docs/17/sql-dropusermapping.html. Status: Implemented.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('DROP USER MAPPING IF EXISTS FOR CURRENT_USER SERVER s');
$operation->toString() // => 'DROP USER MAPPING IF EXISTS FOR CURRENT_USER SERVER s'Properties§
public bool $ifExistspublic RoleSpec|MappingUser $userpublic Name $serverMethods§
public function __construct(
public bool $ifExists,
public RoleSpec|MappingUser $user,
public Name $server,
)Parameters
$ifExists | bool | Whether IF EXISTS is written |
$user | RoleSpec|MappingUser | The user |
$server | Name | The foreign server |
public function deriveStatement(Derivation $derivation): voidDerives nothing: a user mapping is not part of a declaration context.
Parameters
$derivation | Derivation |
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 51
- class-const NameUse::Column() line 55
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
DropUserMappingTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:86
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ForeignDataRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/ForeignDataRule.php:87