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

A table definition that states its primary key in a way SQLite rejects.

Source: https://sqlite.org/lang_createtable.html#the_primary_key.

Reporting AUTOINCREMENT on a column that is no integer primary keydoctest
(new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('CREATE TABLE t (a TEXT PRIMARY KEY AUTOINCREMENT)') // throws \SqlSemantics\Platform\Sqlite\Model\Diagnostic\SemanticException: AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY.

Properties§

Methods§

public function __construct(public PrimaryKeyFlaw $flaw)

Parameters

$flawPrimaryKeyFlawWhat is wrong with the primary key
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 3