classDomainInput
final class DomainInput
Derives the environment in which the constraint expressions of a domain are evaluated.
Rule: PG-DOMAIN-VALUE-001. A domain constraint sees exactly one input: the value being checked, written as the keyword VALUE, which the grammar reads as a column reference named value. The value is found by that unqualified name only; any other column name is missing. Its type is the base type in CREATE DOMAIN and depends on the undeclared domain in ALTER DOMAIN; it may be NULL. The statement that holds the constraints is the relation occurrence that offers the value. A domain named with more than three parts is a diagnostic. Source: https://www.postgresql.org/docs/17/sql-createdomain.html ("the key word VALUE … refers to the value being tested"). Status: Implemented.
Methods§
public function environment(
Derivation $derivation,
Relation $holder,
TypeFact $type,
): EnvironmentRecords the empty row of the holder and answers the environment that sees the value.
Parameters
$derivation | Derivation | |
$holder | Relation | |
$type | TypeFact |
Returns
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Statement\Catalog\Domain\AlterDomainConstraint::deriveStatement() packages/sql-semantics-postgres/src/Statement/Catalog/Domain/AlterDomainConstraint.php:54
- method-call SqlSemantics\Platform\PostgreSql\Statement\Catalog\Domain\CreateDomain::deriveStatement() packages/sql-semantics-postgres/src/Statement/Catalog/Domain/CreateDomain.php:65
Calls 7
- method-call Derivation::relation() line 46
- new Environment line 46
- new Name line 47
- new VisibleRelation line 49
- new ImplicitSlot line 49
- new OutputSlot line 49
- class-const Nullability::Nullable() line 49
public function undeclared(Derivation $derivation, DottedName $domain): TypeFactAnswers the type of the value of a domain that the context cannot declare.
Parameters
$derivation | Derivation | |
$domain | DottedName |
Returns
Called from 1
Calls 9
- method-call DottedName::qualified() line 57
- new CatalogMisuse line 59
- class-const CatalogMisuseRule::ImproperName() line 59
- function-call
implodeline 59 - function-call
array_mapline 59 - method-call Derivation::report() line 60
- new Invalid line 62
- new Dependent line 65
- new UndeclaredDomain line 65
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
DomainInputTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Statement\Catalog\Domain\AlterDomainConstraint::deriveStatement() packages/sql-semantics-postgres/src/Statement/Catalog/Domain/AlterDomainConstraint.php:53
- new SqlSemantics\Platform\PostgreSql\Statement\Catalog\Domain\CreateDomain::deriveStatement() packages/sql-semantics-postgres/src/Statement/Catalog/Domain/CreateDomain.php:65
Method calls 3
- method-call SqlSemantics\Platform\PostgreSql\Statement\Catalog\Domain\AlterDomainConstraint::deriveStatement() packages/sql-semantics-postgres/src/Statement/Catalog/Domain/AlterDomainConstraint.php:54
- method-call SqlSemantics\Platform\PostgreSql\Statement\Catalog\Domain\AlterDomainConstraint::deriveStatement() packages/sql-semantics-postgres/src/Statement/Catalog/Domain/AlterDomainConstraint.php:54
- method-call SqlSemantics\Platform\PostgreSql\Statement\Catalog\Domain\CreateDomain::deriveStatement() packages/sql-semantics-postgres/src/Statement/Catalog/Domain/CreateDomain.php:65