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

Two lists whose lengths MySQL requires to agree, with the lengths written.

Reading the lengths of a set operation that disagreedoctest
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('SELECT 1 UNION SELECT 1, 2') // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\SemanticException: The used SELECT statements have a different number of columns (1 and 2).

Properties§

public CountedList $list
public int $expected
public int $actual

Methods§

public function __construct(public CountedList $list, public int $expected, public int $actual)

Parameters

$listCountedListThe lists that disagree
$expectedintThe length the first list fixes
$actualintThe length of the list that disagrees
public function message(): string

Describes the disagreement in the words of the server.

Returns

string
Test cases 1

Test cases 6§

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 5

Relations§

Instantiated in 5