Package dev.frostlake.functions.scalar.conditional


package dev.frostlake.functions.scalar.conditional
  • Classes
    Class
    Description
    BOOLAND(expr1, expr2) — three-valued logical AND over numeric/boolean inputs (non-zero is TRUE, zero is FALSE).
    Shared truthiness helper for the BOOLAND / BOOLOR / BOOLNOT / BOOLXOR functions.
    BOOLNOT(expr1) — three-valued logical NOT over a numeric/boolean input (non-zero is TRUE, zero is FALSE).
    BOOLOR(expr1, expr2) — three-valued logical OR over numeric/boolean inputs (non-zero is TRUE, zero is FALSE).
    BOOLXOR(expr1, expr2) — three-valued logical exclusive-OR over numeric/boolean inputs (non-zero is TRUE, zero is FALSE).
     
    DECODE(expr, search1, result1 [, search2, result2 ...] [, default]) Like a searched CASE: compares expr to each search value and returns the matching result.
    EQUAL_NULL(a, b) — NULL-safe equality: returns TRUE if both NULL, TRUE if equal, FALSE otherwise.
     
    GREATEST_IGNORE_NULLS — the largest non-NULL argument, IGNORING NULLs (Snowflake's explicit skipping variant; plain LEAST/GREATEST return NULL when any argument is NULL).
     
     
     
    LEAST_IGNORE_NULLS — the smallest non-NULL argument, IGNORING NULLs (Snowflake's explicit skipping variant; plain LEAST/GREATEST return NULL when any argument is NULL).
     
     
     
    NVL2(expr1, expr2, expr3) — returns expr2 when expr1 is NOT NULL, otherwise expr3.
    How GREATEST and LEAST order arguments that are not already the same family.
    REGR_VALX(y, x) — x when BOTH arguments are non-NULL, else NULL.
    REGR_VALY(y, x) — y when BOTH arguments are non-NULL, else NULL.
    ZEROIFNULL refuses more DECLARED families than its numeric-argument neighbours: a SQL BOOLEAN, every temporal flavour and a BINARY are each a compile-time argument-type error — positioned at the call, the family named with its parameters ((BOOLEAN), (DATE), (TIME(9)), (TIMESTAMP_NTZ(9)), (BINARY(67108864))) — while NUMBER, FLOAT, VARCHAR and VARIANT convert, a VARIANT even when it holds the same boolean that is refused declared (all live-verified).