classConstraintScope
final class ConstraintScope
What the expressions and column names inside a table definition can refer to.
Rule: SQLITE-DEFINITION-SCOPE-001. A CHECK constraint, a key term and an index expression see the columns of the table being defined or changed and its row identifier. The expression of a generated column sees the columns but "may not directly reference the ROWID". A DEFAULT value must be constant and sees no column at all, so a column name in it is a missing column. A column list of a constraint names declared columns only. The scope is a working value of one derivation. Source: https://sqlite.org/lang_createtable.html, https://sqlite.org/gencol.html. Status: Implemented.
Properties§
public Environment $rowpublic Environment $columnspublic Environment $constantpublic list<Name>|null $namespublic Comparison $comparisonMethods§
public function __construct(
public Environment $row,
public Environment $columns,
public Environment $constant,
public list<Name>|null $names,
public Comparison $comparison,
)Parameters
$row | Environment | The position that sees the columns and the row identifier |
$columns | Environment | The position that sees the columns only |
$constant | Environment | The position that sees no column |
$names | list<Name>|null | The declared column names, or null when the column list of the table is not completely known |
$comparison | Comparison | How column names are compared |
public function lacks(Name $column): boolTells whether a name is certainly not a declared column of the table.
Parameters
$column | Name |
Returns
boolTest cases 2
Called from 1
Calls 1
- method-call Comparison::equal() line 53
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Relations§
Instantiated in 1
Method calls 1
Type declarations 21
- type SqlSemantics\Platform\Sqlite\Rules\Definition\TableShapes packages/sql-semantics-sqlite/src/Rules/Definition/TableShapes.php:109
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Column\Collation packages/sql-semantics-sqlite/src/Statement/Schema/Column/Collation.php:41
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Column\ColumnCheck packages/sql-semantics-sqlite/src/Statement/Schema/Column/ColumnCheck.php:46
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Column\ColumnConstraint packages/sql-semantics-sqlite/src/Statement/Schema/Column/ColumnConstraint.php:29
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Column\ColumnDefinition packages/sql-semantics-sqlite/src/Statement/Schema/Column/ColumnDefinition.php:105
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Column\ColumnPrimaryKey packages/sql-semantics-sqlite/src/Statement/Schema/Column/ColumnPrimaryKey.php:49
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Column\ColumnUnique packages/sql-semantics-sqlite/src/Statement/Schema/Column/ColumnUnique.php:41
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Column\ConstraintName packages/sql-semantics-sqlite/src/Statement/Schema/Column/ConstraintName.php:47
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Column\DefaultExpression packages/sql-semantics-sqlite/src/Statement/Schema/Column/DefaultExpression.php:43
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Column\DefaultLiteral packages/sql-semantics-sqlite/src/Statement/Schema/Column/DefaultLiteral.php:48
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Column\DefaultWord packages/sql-semantics-sqlite/src/Statement/Schema/Column/DefaultWord.php:60
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Column\Generated packages/sql-semantics-sqlite/src/Statement/Schema/Column/Generated.php:70
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Column\NotNull packages/sql-semantics-sqlite/src/Statement/Schema/Column/NotNull.php:40
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Column\NullAllowed packages/sql-semantics-sqlite/src/Statement/Schema/Column/NullAllowed.php:41
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Reference\Deferrability packages/sql-semantics-sqlite/src/Statement/Schema/Reference/Deferrability.php:54
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Reference\ForeignKeyClause packages/sql-semantics-sqlite/src/Statement/Schema/Reference/ForeignKeyClause.php:81
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Table\ForeignKey packages/sql-semantics-sqlite/src/Statement/Schema/Table/ForeignKey.php:55
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Table\TableCheck packages/sql-semantics-sqlite/src/Statement/Schema/Table/TableCheck.php:49
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Table\TableConstraint packages/sql-semantics-sqlite/src/Statement/Schema/Table/TableConstraint.php:27
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Table\TablePrimaryKey packages/sql-semantics-sqlite/src/Statement/Schema/Table/TablePrimaryKey.php:65
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Table\TableUnique packages/sql-semantics-sqlite/src/Statement/Schema/Table/TableUnique.php:60