final class CastRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql\Lowering". Code outside that scope must not name this declaration.

Lowers the cast and transform commands.

Rule: PG-CAST-LOWER-001. Scope: CreateCastStmt, cast_context, DropCastStmt, CreateTransformStmt, transform_element_list, DropTransformStmt. Constructors: CreateCast, CreateTransform, TransformFunction, and the routine family's Drop with a CastObject or TransformObject, because the server represents DROP CAST and DROP TRANSFORM as DropStmt of kind OBJECT_CAST and OBJECT_TRANSFORM. Source: https://www.postgresql.org/docs/17/sql-createcast.html, https://www.postgresql.org/docs/17/sql-dropcast.html, https://www.postgresql.org/docs/17/sql-createtransform.html, https://www.postgresql.org/docs/17/sql-droptransform.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function functions(Form $form): list<TransformFunction>

Lowers transform_element_list into its functions in the order written.

Parameters

$formForm

Returns

Throws

ImplementationGap When the production has no rule
Test cases 1
Called from 1
Calls 4

Private surface 2§

Implementation details, listed for orientation only.

private const TRANSFORMS = ['transform_element_list: FROM SQL_P WITH FUNCTION function_with_argtypes , TO …
private Lowering $lowering

Test cases 2§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 2

Relations§

Instantiated in 1
Method calls 1