Class ModeFunction

All Implemented Interfaces:
ExpressionWithVariableParameters, NamedExpression, HasSQL, Typed
Direct Known Subclasses:
FunctionsDB2Derby, FunctionsLegacy, FunctionsMSSQLServer, FunctionsMySQL, FunctionsOracle, FunctionsPostgreSQL

public abstract class ModeFunction extends FunctionN
Base class for mode-specific functions.
  • Field Details

    • VAR_ARGS

      protected static final int VAR_ARGS
      Constant for variable number of arguments.
      See Also:
    • info

      protected final FunctionInfo info
      The information about this function.
  • Method Details

    • getFunction

      public static ModeFunction getFunction(Database database, String name)
      Get an instance of the given function for this database. If no function with this name is found, null is returned.
      Parameters:
      database - the database
      name - the upper case function name
      Returns:
      the function object or null
    • doneWithParameters

      public void doneWithParameters()
      Description copied from interface: ExpressionWithVariableParameters
      This method must be called after all the parameters have been set. It checks if the parameter count is correct when required by the implementation.
      Specified by:
      doneWithParameters in interface ExpressionWithVariableParameters
      Overrides:
      doneWithParameters in class OperationN
    • getName

      public String getName()
      Description copied from interface: NamedExpression
      Get the name.
      Returns:
      the name in uppercase
    • isEverything

      public boolean isEverything(ExpressionVisitor visitor)
      Description copied from class: Expression
      Check if this expression and all sub-expressions can fulfill a criteria. If any part returns false, the result is false.
      Overrides:
      isEverything in class OperationN
      Parameters:
      visitor - the visitor
      Returns:
      if the criteria can be fulfilled