Class ToQuery

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

public class ToQuery extends TableFunction
TO_QUERY table function — compiles a SQL text into a query and returns its result set: SELECT * FROM TABLE(TO_QUERY('SELECT ...')). Optional named arguments are bound into :name placeholders inside the text (TO_QUERY('... WHERE c = :v', v => 5)); an unsupplied placeholder binds as NULL.
  • Constructor Details

  • Method Details

    • execute

      public ResultSet execute(Map<String,Object> namedArgs)
      The query text's parameter is named SQL, not INPUT — TO_QUERY(SQL => '…') runs and TO_QUERY(INPUT => '…') is refused for naming a parameter that does not exist. Every OTHER named argument is a bind for a :name placeholder inside the text.
      Specified by:
      execute in class TableFunction
    • execute

      public ResultSet execute(List<Object> positionalArgs)
      Description copied from class: TableFunction
      Execute the table function with positional arguments. Override this in user-defined table functions.
      Overrides:
      execute in class TableFunction
    • validateArgs

      public void validateArgs(Map<String,Object> namedArgs)
      Description copied from class: TableFunction
      Validate the arguments passed to the function
      Specified by:
      validateArgs in class TableFunction