: Class Function_NVL

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ModSQL
Class Function_NVL

    java.lang.Object
      |
      +--ModSQL.AbstractFunction
            |
            +--ModSQL.Function_NVL

All Implemented Interfaces:
  Function

final class Function_NVL
extends AbstractFunction

SQL function for NVL (null value substitution function).

Author:
  chris.studholme@utoronto.ca

Field Summary
`private int` | `return_type` Return type of function.

Fields inherited from class ModSQL.AbstractFunction
`all_constant, constant_non_null, evaluate_order, evaluate_order_array, out_of_order, parameter_constant, parameter_value, parameters, parameters_array`

Fields inherited from interface ModSQL.Function
`MATCH_BEGINS, MATCH_EQU, MATCH_GT, MATCH_GTE, MATCH_LT, MATCH_LTE, MATCH_NE`

Constructor Summary
`(package private)` | `Function_NVL()`

Method Summary
`Object` | `evaluate(boolean aggregate)` Evaluate parameters and compute the function.
`static Function` | `forName(String name)` If name is "nvl", this method returns an instance of this class.
`String` | `functionName()` Returns "#NVL".
`int` | `getMaxResultSize()` Make size of any String that may be returned, or -1 if a maximum size is not known.
`int` | `getSQLType()` Returns the SQL type of this function.
`void` | `optimize()` Prepare the function for use.

Methods inherited from class ModSQL.AbstractFunction
`addParameter, convertToSQLType, evaluate, evaluateConstantParameters, evaluateOrder, evaluateParameters, evaluateParameters, getCompatableType, getObjectSQLType, getParameter, getParameterCount, isAggregate, isConstant, postfixParameters, prefixParameters, registerWith, reset, toString`

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait`

Field Detail

### return_type

    private int return_type

  Return type of function.

Constructor Detail

### Function_NVL

    Function_NVL()

Method Detail

### forName

    public static Function forName(String name)

  If name is "nvl", this method returns an instance of this class.
  Parameters:
    `name` - name of desired function
  Returns:
    instance of this class, or null if name does not match

### optimize

    public void optimize()
                  throws SQLException

  Prepare the function for use.

  Overrides:
    `optimize` in class `AbstractFunction`
  Throws:
    `SQLException` - if the parameters are invalid

### getSQLType

    public int getSQLType()

  Returns the SQL type of this function.
  Returns:
    SQL type of data to be returned

### getMaxResultSize

    public int getMaxResultSize()
                         throws SQLException

  Make size of any String that may be returned, or -1 if a maximum size is not known.
  Returns:
    maximum size of String returned or -1 if unknown
  Throws:
    `SQLException` - if thrown by a parameter

### functionName

    public String functionName()

  Returns "#NVL".
  Overrides:
    `functionName` in class `AbstractFunction`
  Returns:
    name of function

### evaluate

    public Object evaluate(boolean aggregate)
                    throws SQLException,
                           EndOfTable

  Evaluate parameters and compute the function.

  Parameters:
    `aggregate` - passed to parameter
  Returns:
    result object
  Throws:
    `SQLException` - if a database-access error occurs
    `EndOfTable` - if thrown by a parameter

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD