interface CastRenderer

Renders platform-specific CAST expressions.

Each platform provides an implementation that maps ColumnDeclaration to the appropriate CAST syntax for that SQL dialect.

Methods§

public function renderCast(string $expression, ColumnDeclaration $type): string

Render a CAST expression for a given expression string.

Parameters

$expressionstringThe SQL expression to cast (e.g. "'Alice'", "1", "NULL").
$typeColumnDeclarationThe target column type.

Returns

string A SQL CAST expression (e.g. "CAST('Alice' AS CHAR)").
Called from 9

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§

Implemented by 4
Method calls 14
Type declarations 24