final class RandomColumnName
    implements MissingInput
    uses Snapshot
Public API: explicitly declared with @visibility public.

The name SQLite picks at random for a column of a subquery whose name repeats earlier names too often.

Rule: SQLITE-RELATION-NAME-001. SQLite tells repeated column names of a subquery, a common table or a view apart with the suffixes :1 to :4; when all of them are taken it appends random digits. The name of such a column is decided only when the statement runs, so a lookup that could only match that column depends on this choice. Source: sqlite3ColumnsFromExprList() in select.c of release 3.47.2, https://sqlite.org/lang_select.html#the_from_clause. Status: Implemented.

Reading why a column of a derived table cannot be decided by namedoctest
$query = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('SELECT x FROM (SELECT 1 AS a, 2 AS a, 3 AS a, 4 AS a, 5 AS a, 6 AS a)', []);
    $query->facts->scalar($query->statement->columns[0]->expression)->resolution->missing[0]->describe() // => 'the name SQLite picks at random for a column whose name repeats five earlier names'

Methods§

public function describe(): string

Describes the missing input.

Returns

string
Test cases 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