enumGeneratedColumnFlaw
enum GeneratedColumnFlaw: string
Public API: explicitly declared with
@visibility public.The ways a table definition can use generated columns wrongly.
Source: https://sqlite.org/gencol.html#limitations.
$create = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('CREATE TABLE t (a, b AS (a) DEFAULT 1)');
$create->facts->diagnostics[0]->flaw // => \SqlSemantics\Platform\Sqlite\Statement\Schema\Problem\GeneratedColumnFlaw::WithDefaultCases§
case WithDefault = 'A generated column cannot have a DEFAULT value.'case InPrimaryKey = 'A generated column cannot be part of the PRIMARY KEY.'case NoPlainColumn = 'A table must have at least one column that is not generated.'Test cases 3§
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 2
Relations§
Constant reads 3
- class-const SqlSemantics\Platform\Sqlite\Rules\Definition\TableProblems::generated() packages/sql-semantics-sqlite/src/Rules/Definition/TableProblems.php:84
- class-const SqlSemantics\Platform\Sqlite\Rules\Definition\TableProblems::generated() packages/sql-semantics-sqlite/src/Rules/Definition/TableProblems.php:88
- class-const SqlSemantics\Platform\Sqlite\Statement\Schema\Column\ColumnDefinition::deriveColumn() packages/sql-semantics-sqlite/src/Statement/Schema/Column/ColumnDefinition.php:119