enum CastSpelling
Public API: explicitly declared with @visibility public.

How a type cast is written.

x::t and CAST(x AS t) request the same conversion; the grammar keeps them as different token sequences, and only the operator form takes part in operator precedence. Source: https://www.postgresql.org/docs/17/sql-expressions.html#SQL-SYNTAX-TYPE-CASTS.

Reading the spelling of a castdoctest
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT 1::text');
    $query->field(0)->expression->spelling // => \SqlSemantics\Platform\PostgreSql\Statement\Expression\CastSpelling::Operator

Cases§

case Operator

The postfix operator ::.

case Function

The function-like form CAST ( x AS t ).

Test cases 8§

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 7

Relations§

Constant reads 5
Type declarations 1