Class SystemFunctionArity

java.lang.Object
dev.frostlake.functions.SystemFunctionArity

public final class SystemFunctionArity extends Object
How many arguments the SYSTEM$ functions take. They live outside the registry — dispatched by name from the expression evaluator — so the registry's declared bounds never see them, and a call with the wrong count used to fall through to the implementation and answer whatever it answered (SYSTEM$TYPEOF() was "NULL[LOB]").

Live refuses these in the ORDINARY arity vocabulary, at the call's own position:

   SYSTEM$TYPEOF()                     not enough arguments for function [SYSTEM$TYPEOF()],
                                       expected 1, got 0
   SYSTEM$TYPEOF(1, 2)                 too many arguments for function [SYSTEM$TYPEOF(1, 2)]
                                       expected 1, got 2
   SYSTEM$WAIT(0, 'SECONDS', 3)       … expected 2, got 3
   SYSTEM$GET_TAG('t')                … expected 3, got 1
 

★ EVERY BOUND HERE IS MEASURED, and a name with no entry is left unchecked on purpose — inventing a bound refuses SQL live accepts, which is the worse direction. A maximum of −1 means the minimum was measured and the maximum was not. SYSTEM$ALLOWLIST is deliberately absent: one argument there is a PARAMETER refusal live words its own way, not an arity.

  • Method Details

    • minimumOr

      public static int minimumOr(String name)
      The measured minimum, or −1 when this name's count has not been measured.
      Parameters:
      name - the upper-cased function name
      Returns:
      the minimum, or −1
    • maximumOr

      public static int maximumOr(String name)
      The measured maximum, or −1 when unbounded or unmeasured.
      Parameters:
      name - the upper-cased function name
      Returns:
      the maximum, or −1