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

An operand whose type the construct does not accept.

Source: https://www.postgresql.org/docs/17/functions-logical.html.

Reading the messagedoctest
(new \SqlSemantics\Platform\PostgreSql\Statement\Expression\Problem\OperandMismatch('AND', 'boolean', 'integer'))->message() // => 'Argument of AND must be type boolean, not type integer.'

Properties§

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

Methods§

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

Parameters

$constructstringThe construct, such as 'AND'
$expectedstringThe type the construct needs
$actualstringThe type of the operand
public function message(): string

Describes the problem.

Returns

string
Test cases 1

Test cases 4§

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 3

Relations§

Instantiated in 3