Package dev.frostlake.functions.scalar.conversion
package dev.frostlake.functions.scalar.conversion
-
ClassDescriptionBINARY_AS_STRING(bin) — the binary input's bytes interpreted as UTF-8 text.
DATE(<expr>)— the alias of TO_DATE that ALSO accepts an epoch NUMBER.One element of a numeric input format model, asNumericFormatModelscans it.A numeric INPUT format model — the format argument of TO_NUMBER / TO_DECIMAL / TO_NUMERIC, TO_DOUBLE and TO_DECFLOAT over a text, and of their TRY_ twins — scanned into its alternatives and checked the way the account checks it, before the text is read.STRING_AS_BINARY(s) — the string's UTF-8 bytes as BINARY.TIME(<expr>)— the TIME synonym, which is not TO_TIME.The one conversion behind TO_TIMESTAMP and its TRY_ twins, handing back the value the call's flavour holds: a TIMESTAMP_NTZ is a wall clock, a TIMESTAMP_LTZ the instant the input names shown in the session's zone, and a TIMESTAMP_TZ that instant at an offset it keeps.TO_BINARY(string [, format]) — decodes the input string into aBinaryValueusingformat(default HEX).TO_DECFLOAT(expr [, format]) — a 38-digit decimal float on the account, carried here as a DOUBLE, the engine's stand-in for DECFLOAT (a DECFLOAT column is one too).TO_DOUBLE(expr [, format]).TO_TIME(expr [, format]).TO_TIMESTAMP / TO_TIMESTAMP_LTZ / TO_TIMESTAMP_TZ.TO_UUID(s) — the canonical lowercase form of a UUID string.Catalog entry for TRY_CAST.TRY_TO_BINARY(expr [, format]) — the non-throwing form of TO_BINARY: delegates toToBinary(HEX default / BASE64 / UTF-8) and returns NULL instead of raising when the input cannot be decoded.TRY_TO_DECFLOAT(expr [, format]) —ToDecfloatanswering NULL where TO_DECFLOAT fails on the value: a text that spells no number, a format model the text does not fit, and a model that is not one.TRY_TO_DOUBLE(expr [, format]) —ToDoubleanswering NULL where TO_DOUBLE fails on the value.TRY_TO_NUMBER / TRY_TO_DECIMAL / TRY_TO_NUMERIC — TO_NUMBER's full signature (expr [, format] [, precision, scale]) returning NULL instead of erroring, INCLUDING the scale handling: with no scale the result rounds to a whole number like TO_NUMBER's NUMBER(38,0) default.TRY_TO_TIME(expr [, format]) — the non-throwing form of TO_TIME: delegates toToTimeand returns NULL instead of raising when the input cannot be parsed as a time.TRY_TO_TIMESTAMP / _NTZ / _LTZ / _TZ — the non-throwing form of TO_TIMESTAMP: the same conversion into the same flavour's value (seeTimestampFlavourConversion), NULL instead of a refusal for input it cannot read.TRY_TO_UUID(s) — TO_UUID that returns NULL instead of erroring.