final class InsertedColumn
    implements Scalar
    uses Snapshot
Public API: explicitly declared with @visibility public.

The value an INSERT would have inserted into a column: VALUES(col) in ON DUPLICATE KEY UPDATE (Item_insert_value).

The function is deprecated from MySQL 8.0.20 in favour of a row alias.

Rule: MYSQL-INSERTED-COLUMN-001. Facts: the type of the column; the value is NULL outside ON DUPLICATE KEY UPDATE, so it can always be NULL. Terminates: the column is a strict part. Source: https://dev.mysql.com/doc/refman/8.4/en/miscellaneous-functions.html#function_values. Status: Implemented.

Reading the columndoctest
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('SELECT a FROM t WHERE VALUES(a)');
    $query->facts->scalar($query->statement->where)->nullability // => \SqlSemantics\Platform\MySql\Model\Statement\Type\Nullability::Nullable

Properties§

public ColumnUse $column

Methods§

public function __construct(public ColumnUse $column)

Parameters

$columnColumnUseThe column whose inserted value is read
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFact

Derives the column; the value has its type and can be NULL.

Parameters

$derivationDerivation
$environmentEnvironment

Returns

Calls 3
public function render(Output $out): void

Writes VALUES and the column in parentheses.

Parameters

$outOutput
Test cases 1
Calls 1

Test cases 3§

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

Dedicated tests 2
Other tests reaching this symbol 1

Relations§

Instantiated in 1