final class ColumnCountMismatch
    implements Diagnostic
    uses Snapshot
Public API: explicitly declared with @visibility public.

A view whose column list has another length than the result of its query.

SQLite reports "expected N columns for 'view' but got M" when the view is used. Source: https://sqlite.org/lang_createview.html.

Reporting a column list that is too shortdoctest
(new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('CREATE VIEW v (a) AS SELECT 1, 2') // throws \SqlSemantics\Platform\Sqlite\Model\Diagnostic\SemanticException: The column list names 1 columns but the query returns 2.

Properties§

public int $listed
public int $returned

Methods§

public function __construct(public int $listed, public int $returned)

Parameters

$listedintThe number of names in the column list
$returnedintThe number of columns the query returns
public function message(): string

Describes the problem.

Returns

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