classCastPair
final class CastPair
implements ObjectReference
uses Snapshot
Public API: explicitly declared with
@visibility public.A cast named by its source and target types: ( source AS target ).
Source: https://www.postgresql.org/docs/17/sql-dropcast.html.
$text = new \SqlSemantics\Platform\PostgreSql\Statement\Type\TypeName(new \SqlSemantics\Platform\PostgreSql\Statement\Type\Designation\NamedDesignation(new \SqlSemantics\Platform\PostgreSql\Statement\Name\DottedName([new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('text')])));
$mood = new \SqlSemantics\Platform\PostgreSql\Statement\Type\TypeName(new \SqlSemantics\Platform\PostgreSql\Statement\Type\Designation\NamedDesignation(new \SqlSemantics\Platform\PostgreSql\Statement\Name\DottedName([new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('mood')])));
(new \SqlSemantics\Platform\PostgreSql\Statement\Object\Reference\CastPair($text, $mood))->target === $mood // => trueProperties§
public TypeName $sourcepublic TypeName $targetMethods§
public function deriveClause(Derivation $derivation, Environment $environment): voidDerives the type modifiers.
Parameters
$derivation | Derivation | |
$environment | Environment |
Test cases 1
Calls 1
- method-call TypeName::deriveClause() line 42
public function render(Output $out): voidWrites the types in parentheses.
Parameters
$out | Output |
Test cases 1
Calls 1
- method-call Output::symbol() line 51
Test cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 3
Relations§
Instantiated in 3
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\CastRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/CastRule.php:72
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\ExtensionRule::contents() packages/sql-semantics-postgres/src/Lowering/Catalog/ExtensionRule.php:132
- new SqlSemantics\Platform\PostgreSql\Lowering\Routine\ObjectRule::keyed() packages/sql-semantics-postgres/src/Lowering/Routine/ObjectRule.php:179