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
A table value function.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Column[]
private final int
private static final String[]
static final int
TABLE() (non-standard).static final int
TABLE_DISTINCT() (non-standard).static final int
UNNEST().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 -
Method Summary
Modifier and TypeMethodDescriptionint
getName()
Get the name.getSQL
(StringBuilder builder, int sqlFlags) Appends the SQL statement of this object to the specified builder.private ResultInterface
getTable
(SessionLocal session, boolean onlyColumnList) getValue
(SessionLocal session) Get a result with.getValueTemplate
(SessionLocal session) Get an empty result with the column names set.boolean
Whether the function always returns the same result for the same parameters.void
optimize
(SessionLocal session) Try to optimize this table functionvoid
setColumns
(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 Details
-
UNNEST
public static final int UNNESTUNNEST().- See Also:
-
TABLE
public static final int TABLETABLE() (non-standard).- See Also:
-
TABLE_DISTINCT
public static final int TABLE_DISTINCTTABLE_DISTINCT() (non-standard).- See Also:
-
columns
-
NAMES
-
function
private final int function
-
-
Constructor Details
-
ArrayTableFunction
public ArrayTableFunction(int function)
-
-
Method Details
-
getValue
Description copied from class:TableFunction
Get a result with.- Specified by:
getValue
in classTableFunction
- Parameters:
session
- the session- Returns:
- the result
-
optimize
Description copied from class:TableFunction
Try to optimize this table function- Overrides:
optimize
in classTableFunction
- Parameters:
session
- the session
-
getSQL
Description copied from interface:HasSQL
Appends the SQL statement of this object to the specified builder.- Specified by:
getSQL
in interfaceHasSQL
- Overrides:
getSQL
in classTableFunction
- Parameters:
builder
- string buildersqlFlags
- formatting flags- Returns:
- the specified string builder
-
getValueTemplate
Description copied from class:TableFunction
Get an empty result with the column names set.- Specified by:
getValueTemplate
in classTableFunction
- Parameters:
session
- the session- Returns:
- the empty result
-
setColumns
-
getTable
-
getName
Description copied from interface:NamedExpression
Get the name.- Returns:
- the name in uppercase
-
isDeterministic
public boolean isDeterministic()Description copied from class:TableFunction
Whether the function always returns the same result for the same parameters.- Specified by:
isDeterministic
in classTableFunction
- Returns:
- true if it does
-
getFunctionType
public int getFunctionType()
-