Package org.h2.expression.function.table
Class ArrayTableFunction
- java.lang.Object
-
- org.h2.expression.function.table.TableFunction
-
- org.h2.expression.function.table.ArrayTableFunction
-
- All Implemented Interfaces:
ExpressionWithVariableParameters,NamedExpression,HasSQL
public final class ArrayTableFunction extends TableFunction
A table value function.
-
-
Field Summary
Fields Modifier and Type Field Description private Column[]columnsprivate intfunctionprivate static java.lang.String[]NAMESstatic intTABLETABLE() (non-standard).static intTABLE_DISTINCTTABLE_DISTINCT() (non-standard).static intUNNESTUNNEST().-
Fields inherited from class org.h2.expression.function.table.TableFunction
args
-
Fields inherited from interface org.h2.util.HasSQL
ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS
-
-
Constructor Summary
Constructors Constructor Description ArrayTableFunction(int function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetFunctionType()java.lang.StringgetName()Get the name.java.lang.StringBuildergetSQL(java.lang.StringBuilder builder, int sqlFlags)Appends the SQL statement of this object to the specified builder.private ResultInterfacegetTable(SessionLocal session, boolean onlyColumnList)ResultInterfacegetValue(SessionLocal session)Get a result with.ResultInterfacegetValueTemplate(SessionLocal session)Get an empty result with the column names set.booleanisDeterministic()Whether the function always returns the same result for the same parameters.voidoptimize(SessionLocal session)Try to optimize this table functionvoidsetColumns(java.util.ArrayList<Column> columns)-
Methods inherited from class org.h2.expression.function.table.TableFunction
addParameter, doneWithParameters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.h2.util.HasSQL
getSQL, getTraceSQL
-
-
-
-
Field Detail
-
UNNEST
public static final int UNNEST
UNNEST().- See Also:
- Constant Field Values
-
TABLE
public static final int TABLE
TABLE() (non-standard).- See Also:
- Constant Field Values
-
TABLE_DISTINCT
public static final int TABLE_DISTINCT
TABLE_DISTINCT() (non-standard).- See Also:
- Constant Field Values
-
columns
private Column[] columns
-
NAMES
private static final java.lang.String[] NAMES
-
function
private final int function
-
-
Method Detail
-
getValue
public ResultInterface getValue(SessionLocal session)
Description copied from class:TableFunctionGet a result with.- Specified by:
getValuein classTableFunction- Parameters:
session- the session- Returns:
- the result
-
optimize
public void optimize(SessionLocal session)
Description copied from class:TableFunctionTry to optimize this table function- Overrides:
optimizein classTableFunction- Parameters:
session- the session
-
getSQL
public java.lang.StringBuilder getSQL(java.lang.StringBuilder builder, int sqlFlags)Description copied from interface:HasSQLAppends the SQL statement of this object to the specified builder.- Specified by:
getSQLin interfaceHasSQL- Overrides:
getSQLin classTableFunction- Parameters:
builder- string buildersqlFlags- formatting flags- Returns:
- the specified string builder
-
getValueTemplate
public ResultInterface getValueTemplate(SessionLocal session)
Description copied from class:TableFunctionGet an empty result with the column names set.- Specified by:
getValueTemplatein classTableFunction- Parameters:
session- the session- Returns:
- the empty result
-
setColumns
public void setColumns(java.util.ArrayList<Column> columns)
-
getTable
private ResultInterface getTable(SessionLocal session, boolean onlyColumnList)
-
getName
public java.lang.String getName()
Description copied from interface:NamedExpressionGet the name.- Returns:
- the name in uppercase
-
isDeterministic
public boolean isDeterministic()
Description copied from class:TableFunctionWhether the function always returns the same result for the same parameters.- Specified by:
isDeterministicin classTableFunction- Returns:
- true if it does
-
getFunctionType
public int getFunctionType()
-
-