org.h2.expression.function

## Class TableFunction

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

All Implemented Interfaces:
  FunctionCall

    public class TableFunction
    extends Function

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

### Field Summary

### Fields inherited from class org.h2.expression.function.Function

`ABS, ACOS, ADD_MONTHS, args, ARRAY_APPEND, ARRAY_CONCAT, ARRAY_CONTAINS, ARRAY_GET, ARRAY_LENGTH, ARRAY_SLICE, ASCII, ASIN, ATAN, ATAN2, AUTOCOMMIT, BIT_LENGTH, BITAND, BITGET, BITOR, BITXOR, CANCEL_SESSION, CASE, CASEWHEN, CAST, CEILING, CENTURY, CHAR, CHAR_LENGTH, COALESCE, COMPRESS, CONCAT, CONCAT_WS, CONVERT, COS, COSH, COT, CSVREAD, CSVWRITE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CURRVAL, DATABASE, DATABASE_PATH, DATE_ADD, DATE_DIFF, DATE_TRUNC, DAY_NAME, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_YEAR, DECADE, DECODE, DECRYPT, DEGREES, DIFFERENCE, DISK_SPACE_USED, DOW, ENCRYPT, EPOCH, ESTIMATED_ENVELOPE, EXP, EXPAND, EXTRACT, FILE_READ, FILE_WRITE, FLOOR, FORMATDATETIME, GREATEST, H2VERSION, HASH, HEXTORAW, HOUR, IDENTITY, IFNULL, info, INSERT, INSTR, ISO_DAY_OF_WEEK, ISO_WEEK, ISO_YEAR, LCASE, LEAST, LEFT, LENGTH, LINK_SCHEMA, LN, LOCALTIME, LOCALTIMESTAMP, LOCATE, LOCK_MODE, LOCK_TIMEOUT, LOG, LOG10, LOWER, LPAD, LTRIM, MEMORY_FREE, MEMORY_USED, MICROSECOND, MILLENNIUM, MILLISECOND, MINUTE, MOD, MONTH, MONTH_NAME, NANOSECOND, NEXTVAL, NULLIF, NVL2, OCTET_LENGTH, ORA_HASH, PARSEDATETIME, PI, POSITION, POWER, QUARTER, RADIANS, RAND, RANDOM_UUID, RAWTOHEX, READONLY, REGEXP_LIKE, REGEXP_REPLACE, REPEAT, REPLACE, RIGHT, ROUND, ROUNDMAGIC, RPAD, RTRIM, SCHEMA, SCOPE_IDENTITY, SECOND, SECURE_RAND, SESSION_ID, SET, SIGN, SIGNAL, SIN, SINH, SOUNDEX, SPACE, SQRT, STRINGDECODE, STRINGENCODE, STRINGTOUTF8, SUBSTR, SUBSTRING, TABLE, TABLE_DISTINCT, TAN, TANH, TIMEZONE_HOUR, TIMEZONE_MINUTE, TO_CHAR, TO_DATE, TO_TIMESTAMP, TO_TIMESTAMP_TZ, TRANSACTION_ID, TRANSLATE, TRIM, TRIM_LEADING, TRIM_TRAILING, TRUNCATE, TRUNCATE_VALUE, type, UCASE, UNNEST, UPPER, USER, UTF8TOSTRING, VALUES, VAR_ARGS, WEEK, XMLATTR, XMLCDATA, XMLCOMMENT, XMLNODE, XMLSTARTDOC, XMLTEXT, YEAR, ZERO`

### Fields inherited from class org.h2.expression.Expression

`MAP_IN_AGGREGATE, MAP_IN_WINDOW, MAP_INITIAL`

### Method Summary

Methods
`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.
`long` `getRowCount()`
`java.lang.StringBuilder` `getSQL(java.lang.StringBuilder builder, boolean alwaysQuote)` Appends the SQL statement of this expression to the specified builder.
`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.
`boolean` `isConstant()` Check if this expression will always return the same value.
`void` `setColumns(java.util.ArrayList<Column> columns)`

### Methods inherited from class org.h2.expression.function.Function

`doneWithParameters, getArgs, getCost, getFlags, getFunction, getFunctionInfo, getFunctionType, getName, getNullOrValue, getSubexpression, getSubexpressionCount, getType, getValueType, getValueWithArgs, isBufferResultSetToLocalTemp, isDeterministic, isEverything, isGeneratedKey, mapColumns, optimize, setDataType, setEvaluatable, setFlags, setParameter, updateAggregate`

### Methods inherited from class org.h2.expression.Expression

`addFilterConditions, createIndexConditions, getAlias, getBooleanValue, getColumnName, getExpressionColumns, getExpressionColumns, getNonAliasExpression, getNotIfPossible, getNullable, getSchemaName, getSQL, getTableAlias, getTableName, getUnenclosedSQL, isAutoIncrement, isValueSet, toString, writeExpressions, writeExpressions`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.h2.expression.function.FunctionCall

`getSQL`

### 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.StringBuilder getSQL(java.lang.StringBuilder builder,
                                 boolean alwaysQuote)

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

Overrides:
  `getSQL` in class `Function`
Parameters:
  `builder` - string builder
  `alwaysQuote` - quote all identifiers
Returns:
  the specified string builder

#### 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

#### isConstant

    public boolean isConstant()

Description copied from class: `Expression`
Check if this expression will always return the same value.

Overrides:
  `isConstant` in class `Expression`
Returns:
  if the expression is constant