final class IntoClause
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

The INTO clause of SELECT INTO: the new table the rows are stored in.

Mirrors PostgreSQL's IntoClause of a selection. The optional TABLE word changes nothing and is not kept. Source: https://www.postgresql.org/docs/17/sql-selectinto.html.

Reading the target of SELECT INTOdoctest
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT 1 AS a INTO TEMP TABLE t');
    [$query->statement->into->table->name->value, $query->statement->into->persistence->value, $query->toString()] // => ['t', 'TEMP', 'SELECT 1 AS a INTO TEMP t']

Properties§

public QualifiedName $table
public IntoPersistence $persistence = IntoPersistence::Permanent

Methods§

public function __construct(
    public QualifiedName $table,
    public IntoPersistence $persistence = IntoPersistence::Permanent,
)

Parameters

$tableQualifiedNameThe name of the new table
$persistenceIntoPersistenceThe kind of table, as written
Calls 1
public function render(Output $out): void

Writes INTO, the persistence words and the table name.

Parameters

$outOutput
Calls 4

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
Type declarations 3