Class Generator

java.lang.Object
dev.frostlake.functions.TableFunction
dev.frostlake.functions.table.Generator

public class Generator extends TableFunction
GENERATOR table function - generates rows with sequential numbers Supports: - ROWCOUNT => n (generates n rows) - TIMELIMIT => seconds (generates rows for specified time period)
  • Constructor Details

    • Generator

      public Generator()
  • Method Details

    • execute

      public ResultSet execute(List<Object> positionalArgs)
      A positional argument is not one GENERATOR can use, and live answers zero rows rather than refuse.
      Overrides:
      execute in class TableFunction
    • execute

      public ResultSet execute(Map<String,Object> namedArgs)
      Description copied from class: TableFunction
      Execute the table function with named arguments
      Specified by:
      execute in class TableFunction
    • validateArgs

      public void validateArgs(Map<String,Object> namedArgs)
      GENERATOR is the permissive end of the table-function family: it IGNORES what it does not recognise instead of refusing it. Live answers zero rows — not an error — for GENERATOR(), for the positional GENERATOR(3) and for GENERATOR(NOSUCH =&gt; 3) alike, so an argument it cannot use simply leaves the row count unset. Only the values of ROWCOUNT and TIMELIMIT are judged.
      Specified by:
      validateArgs in class TableFunction