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

A row of the wrong number of fields or columns where a construct needs a fixed number.

Source: https://www.postgresql.org/docs/17/sql-expressions.html#SQL-SYNTAX-SCALAR-SUBQUERIES.

Reading the messagedoctest
(new \SqlSemantics\Platform\PostgreSql\Statement\Expression\Problem\RowArity('an ARRAY subquery', 1, 2))->message() // => 'an ARRAY subquery needs 1 column(s) but has 2.'

Properties§

public string $construct
public int $expected
public int $actual

Methods§

public function __construct(public string $construct, public int $expected, public int $actual)

Parameters

$constructstringThe construct, such as 'a scalar subquery'
$expectedintThe number of fields it needs
$actualintThe number written
public function message(): string

Describes the problem.

Returns

string
Test cases 1

Test cases 5§

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 4

Relations§

Instantiated in 2