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

The parenthesized column list of INSERT and REPLACE; an empty list writes no column of the rows.

The grammars of MySQL 5.6 and 5.7 also accept a qualified star in the list, which the server does not expand and reports as an unknown column. Source: https://dev.mysql.com/doc/refman/8.4/en/insert.html.

Reading the columns of an INSERTdoctest
$insert = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('INSERT INTO t (a, b) VALUES (1, 2)');
    count($insert->statement->into->columns->columns) // => 2

Properties§

public list<ColumnUse|TableWildcard> $columns

Methods§

public function __construct(list<ColumnUse|TableWildcard> $columns)

Parameters

$columnslist<ColumnUse|TableWildcard>The columns in written order

Throws

InvalidConstruction When a member is neither a column nor a qualified star
Calls 3
public function render(Output $out): void

Writes the parenthesized list.

Parameters

$outOutput
Calls 1

Test cases 2§

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 1

Relations§

Instantiated in 1
Type declarations 1