## org.h2.expression
Class TableFunction

    java.lang.Object
      org.h2.expression.Expression
          org.h2.expression.Function
              org.h2.expression.TableFunction

All Implemented Interfaces:
  FunctionCall

    public class TableFunction

extends Function

Implementation of the functions TABLE(..) and TABLE_DISTINCT(..).

Field Summary

Fields inherited from class org.h2.expression.Function

`ABS, ACOS, args, ARRAY_CONTAINS, ARRAY_GET, ARRAY_LENGTH, ASCII, ASIN, ATAN, ATAN2, AUTOCOMMIT, BIT_LENGTH, BITAND, BITOR, BITXOR, CANCEL_SESSION, CASE, CASEWHEN, CAST, CEILING, CHAR, CHAR_LENGTH, COALESCE, COMPRESS, CONCAT, CONCAT_WS, CONVERT, COS, COSH, COT, CSVREAD, CSVWRITE, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CURRVAL, CURTIME, DATABASE, DATABASE_PATH, DATE_ADD, DATE_DIFF, DAY_NAME, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_YEAR, DECODE, DECRYPT, DEGREES, DIFFERENCE, DISK_SPACE_USED, ENCRYPT, EXP, EXPAND, EXTRACT, FILE_READ, FLOOR, FORMATDATETIME, GREATEST, HASH, HEXTORAW, HOUR, IDENTITY, IFNULL, INSERT, INSTR, ISO_DAY_OF_WEEK, ISO_WEEK, ISO_YEAR, LCASE, LEAST, LEFT, LENGTH, LINK_SCHEMA, LN, LOCATE, LOCK_MODE, LOCK_TIMEOUT, LOG, LOG10, LOWER, LPAD, LTRIM, MEMORY_FREE, MEMORY_USED, MINUTE, MOD, MONTH, MONTH_NAME, NEXTVAL, NOW, NULLIF, NVL2, OCTET_LENGTH, PARSEDATETIME, PI, POSITION, POWER, QUARTER, RADIANS, RAND, RANDOM_UUID, RAWTOHEX, READONLY, REGEXP_REPLACE, REPEAT, REPLACE, RIGHT, ROUND, ROUNDMAGIC, ROW_NUMBER, RPAD, RTRIM, SCHEMA, SCOPE_IDENTITY, SECOND, SECURE_RAND, SESSION_ID, SET, SIGN, SIN, SINH, SOUNDEX, SPACE, SQRT, STRINGDECODE, STRINGENCODE, STRINGTOUTF8, SUBSTR, SUBSTRING, TABLE, TABLE_DISTINCT, TAN, TANH, TRANSACTION_ID, TRIM, TRUNCATE, TRUNCATE_VALUE, UCASE, UPPER, USER, UTF8TOSTRING, WEEK, XMLATTR, XMLCDATA, XMLCOMMENT, XMLNODE, XMLSTARTDOC, XMLTEXT, YEAR, ZERO`

Method Summary
`protected void` `checkParameterCount(int len)` Check if the parameter count is correct.
`Expression[]` `getExpressionColumns(Session session)` If this expression consists of column expressions it should return them.
`java.lang.String` `getName()` Get the name of the function.
`long` `getRowCount()`
`java.lang.String` `getSQL()` Get the SQL statement of this expression.
`Value` `getValue(Session session)` Return the resulting value for the current row.
`ValueResultSet` `getValueForColumnList(Session session, Expression[] nullArgs)` Get an empty result set with the column names set.
`void` `setColumns(java.util.ArrayList<Column> columns)`

Methods inherited from class org.h2.expression.Function
`doneWithParameters, getArgs, getCost, getDisplaySize, getFunction, getFunctionType, getParameterCount, getPrecision, getScale, getType, isDatePart, isDeterministic, isEverything, isFast, mapColumns, optimize, setDataType, setEvaluatable, setParameter, updateAggregate`

Methods inherited from class org.h2.expression.Expression
`addFilterConditions, createIndexConditions, getAlias, getBooleanValue, getColumnName, getExpressionColumns, getNonAliasExpression, getNotIfPossible, getNullable, getSchemaName, getTableAlias, getTableName, isAutoIncrement, isConstant, isValueSet, isWildcard, toString`

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

Method Detail

### getValue

    public Value getValue(Session session)

  Description copied from class: `Expression`
  Return the resulting value for the current row.

  Overrides:
    `getValue` in class `Function`
  Parameters:
    `session` - the session
  Returns:
    the result

### checkParameterCount

    protected void checkParameterCount(int len)

  Description copied from class: `Function`
  Check if the parameter count is correct.

  Overrides:
    `checkParameterCount` in class `Function`
  Parameters:
    `len` - the number of parameters set

### getSQL

    public java.lang.String getSQL()

  Description copied from class: `Expression`
  Get the SQL statement of this expression. This may not always be the original SQL statement, specially after optimization.

  Specified by:
    `getSQL` in interface `FunctionCall`
  Overrides:
    `getSQL` in class `Function`
  Returns:
    the SQL statement

### getName

    public java.lang.String getName()

  Description copied from interface: `FunctionCall`
  Get the name of the function.

  Specified by:
    `getName` in interface `FunctionCall`
  Overrides:
    `getName` in class `Function`
  Returns:
    the name

### getValueForColumnList

    public ValueResultSet getValueForColumnList(Session session,
                                                Expression[] nullArgs)

  Description copied from interface: `FunctionCall`
  Get an empty result set with the column names set.

  Specified by:
    `getValueForColumnList` in interface `FunctionCall`
  Overrides:
    `getValueForColumnList` in class `Function`
  Parameters:
    `session` - the session
    `nullArgs` - the argument list (some arguments may be null)
  Returns:
    the empty result set

### setColumns

    public void setColumns(java.util.ArrayList<Column> columns)

### getRowCount

    public long getRowCount()

### getExpressionColumns

    public Expression[] getExpressionColumns(Session session)

  Description copied from class: `Expression`
  If this expression consists of column expressions it should return them.

  Overrides:
    `getExpressionColumns` in class `Expression`
  Parameters:
    `session` - the session
  Returns:
    array of expression columns if applicable, null otherwise