enum Persistence: string
    implements Node
Public API: explicitly declared with @visibility public.

The persistence written between CREATE and the kind of object: temporary, unlogged or permanent.

Mirrors OptTemp (RELPERSISTENCE_TEMP, UNLOGGED, PERMANENT). TEMP and TEMPORARY are the same request, and LOCAL and GLOBAL change nothing (GLOBAL is deprecated); the spelling is kept because the grammar keeps it. Permanent is the absence of these words. Source: https://www.postgresql.org/docs/17/sql-createtable.html.

Reading the persistence of a tabledoctest
$create = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE LOCAL TEMP TABLE t (a int)');
    [$create->statement->persistence->temporary(), $create->declarations()[0]->name->schema->value] // => [true, 'pg_temp']

Cases§

case Permanent = ''
case Temporary = 'TEMPORARY'
case Temp = 'TEMP'
case LocalTemporary = 'LOCAL TEMPORARY'
case LocalTemp = 'LOCAL TEMP'
case GlobalTemporary = 'GLOBAL TEMPORARY'
case GlobalTemp = 'GLOBAL TEMP'
case Unlogged = 'UNLOGGED'

Methods§

public function render(Output $out): void

Writes the words, none for a permanent object.

Parameters

$outOutput
Calls 3

Test cases 6§

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

Dedicated tests 1
Other tests reaching this symbol 5

Relations§

Method calls 2
Constant reads 19
Type declarations 8