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

Checks that a value assigned to a column converts to the column's type in assignment context.

Rule: PG-ASSIGNMENT-CAST-001. A value converts when its type is the column type, converts implicitly (PG-TYPE-CATEGORY-001), when both are numeric types, when the column is of a string type (automatic I/O conversion to string types is an assignment cast), or along one of the listed pg_cast entries of context a. A string constant or NULL (pseudo-type unknown) converts to any type. Only a pair of types that both belong to the covered catalog types and that none of these allow is reported; any other pair (domains, arrays, user types, money, oid, xml, a value whose type depends on missing declarations) is accepted. Termination: constant work. Source: https://www.postgresql.org/docs/17/typeconv-query.html, https://www.postgresql.org/docs/17/sql-createcast.html, https://www.postgresql.org/docs/17/catalog-pg-cast.html. Status: Implemented.

Methods§

public function refused(Builtin $value, Builtin $column): bool

Private surface 2§

Implementation details, listed for orientation only.

private const COVERED = ['int2', 'int4', 'int8', 'numeric', 'float4', 'float8', 'bool', 'text', 'varcha…
private const ASSIGNMENT = ['timestamp' => ['date', 'time'], 'timestamptz' => ['date', 'time', 'timestamp'…

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