classGeneratedColumnWrite
final class GeneratedColumnWrite
implements Diagnostic
uses Snapshot
Public API: explicitly declared with
@visibility public.A statement that writes a generated column, which SQLite rejects.
The value of a generated column is computed from the other columns of its row, so an INSERT cannot name it in its column list and an UPDATE or an upsert cannot assign it (SQLITE-GENERATED-WRITE-001). The column is named as it is declared, as SQLite does in its message. Source: https://sqlite.org/gencol.html.
$semantics = new \SqlSemantics\Platform\Sqlite\Semantics();
$table = $semantics->analyze('CREATE TABLE t (a, b AS (a + 1))');
$semantics->analyze('UPDATE t SET B = 1', [$table]) // throws \SqlSemantics\Platform\Sqlite\Model\Diagnostic\SemanticException: cannot UPDATE generated column "b"Properties§
public WriteKind $writepublic Name $columnMethods§
public function message(): stringDescribes the problem in the words of SQLite.
Returns
stringTest cases 1
Test cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.