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.

Reading what is discardeddoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('DISCARD TEMPORARY');
    [$operation->statement->target->temporary(), $operation->toString()] // => [true, 'DISCARD TEMPORARY']

Properties§

public DiscardTarget $target

Methods§

public function __construct(public DiscardTarget $target)

Parameters

$targetDiscardTargetWhat is released
public function deriveStatement(Derivation $derivation): void

Derives nothing: session state is not part of a declaration context.

Parameters

$derivationDerivation
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 1

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 1