enum PrimaryKeyFlaw: string
Public API: explicitly declared with @visibility public.

The ways a table definition can state its primary key wrongly.

Source: https://sqlite.org/lang_createtable.html#the_primary_key, https://sqlite.org/autoinc.html, https://sqlite.org/withoutrowid.html.

Naming the flaw of a definition with two primary keysdoctest
$create = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('CREATE TABLE t (a PRIMARY KEY, b PRIMARY KEY)');
    $create->facts->diagnostics[0]->flaw // => \SqlSemantics\Platform\Sqlite\Statement\Schema\Problem\PrimaryKeyFlaw::Repeated

Cases§

case Repeated = 'The table has more than one primary key.'
case MissingWithoutRowid = 'A WITHOUT ROWID table needs a primary key.'
case ExpressionTerm = 'A primary key or unique constraint contains an expression that is not a column…
case AutoincrementNotIntegerKey = 'AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY.'
case AutoincrementWithoutRowid = 'AUTOINCREMENT is not allowed on a WITHOUT ROWID table.'

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§

Constant reads 6
Type declarations 1