Utility functions

PostgreSQL function Register for DQL as Implemented by
cast CAST MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Cast
pg_input_is_valid PG_INPUT_IS_VALID MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\PgInputIsValid
to_char TO_CHAR MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ToChar
to_number TO_NUMBER MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ToNumber
to_hex TO_HEX MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ToHex
to_bin TO_BIN MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ToBin
to_oct TO_OCT MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ToOct
error_on_null ERROR_ON_NULL MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ErrorOnNull
gen_random_uuid GEN_RANDOM_UUID MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\GenRandomUuid
uuidv4 UUIDV4 MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Uuidv4
uuidv7 UUIDV7 MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Uuidv7
uuid_extract_timestamp UUID_EXTRACT_TIMESTAMP MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\UuidExtractTimestamp
uuid_extract_version UUID_EXTRACT_VERSION MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\UuidExtractVersion
<@> DISTANCE MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Distance

TO_NUMBER supports Roman numeral conversion via the RN pattern (PostgreSQL 18+).

ERROR_ON_NULL returns its argument unchanged, or fails the query with null value not allowed when the argument is NULL, so a missing value stops the query instead of reaching your code. Like any polymorphic function, it cannot take a bare string literal: pass a field, an expression over one, or a numeric literal.

DISTANCE is the earthdistance point <@> point operator. It returns the great-circle distance in statute miles between two point values written as (longitude, latitude). It is not a PostGIS operator and does not accept geometry or geography values.

Requires the earthdistance extension: CREATE EXTENSION IF NOT EXISTS earthdistance CASCADE; - earthdistance depends on cube, which CASCADE installs.