classDiscard
final class Discard
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.DISCARD ALL | PLANS | SEQUENCES | TEMP: a request to release session state.
Rule: PG-DISCARD-001. Mirrors PostgreSQL's DiscardStmt. Facts: none; the temporary tables it drops belong to the session, not to a declaration context. Source: https://www.postgresql.org/docs/17/sql-discard.html. Status: Implemented.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('DISCARD TEMPORARY');
[$operation->statement->target->temporary(), $operation->toString()] // => [true, 'DISCARD TEMPORARY']Properties§
public DiscardTarget $targetMethods§
public function __construct(public DiscardTarget $target)Parameters
$target | DiscardTarget | What is released |
public function deriveStatement(Derivation $derivation): voidDerives nothing: session state is not part of a declaration context.
Parameters
$derivation | Derivation |
public function render(Output $out): voidTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
DiscardTestcalls