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

A query that PostgreSQL rejects because it breaks a rule of the language.

Reading the problem of a star without inputdoctest
(new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT *') // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\SemanticException: SELECT * with no tables specified is not valid

Properties§

public Name|null $subject = null

Methods§

public function __construct(public QueryMisuseRule $rule, public Name|null $subject = null)

Parameters

$ruleQueryMisuseRuleThe broken rule
$subjectName|nullThe name the problem is about, for the rules that name one
public function message(): string

Describes the broken rule in the words of PostgreSQL.

Returns

string
Calls 1

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 38