Package org.h2.expression.function.table
Class TableFunction
java.lang.Object
org.h2.expression.function.table.TableFunction
- All Implemented Interfaces:
ExpressionWithVariableParameters,NamedExpression,HasSQL
- Direct Known Subclasses:
ArrayTableFunction,CSVReadFunction,JavaTableFunction,LinkSchemaFunction
public abstract class TableFunction
extends Object
implements HasSQL, NamedExpression, ExpressionWithVariableParameters
A table value function.
-
Field Summary
FieldsFields 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 TypeMethodDescriptionvoidaddParameter(Expression param) Adds the parameter expression.voidThis method must be called after all the parameters have been set.getSQL(StringBuilder builder, int sqlFlags) Appends the SQL statement of this object to the specified builder.abstract ResultInterfacegetValue(SessionLocal session) Get a result with.abstract ResultInterfacegetValueTemplate(SessionLocal session) Get an empty result with the column names set.abstract booleanWhether the function always returns the same result for the same parameters.voidoptimize(SessionLocal session) Try to optimize this table functionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.h2.util.HasSQL
getSQL, getTraceSQLMethods inherited from interface org.h2.expression.function.NamedExpression
getName
-
Field Details
-
args
-
-
Constructor Details
-
TableFunction
-
-
Method Details
-
addParameter
Description copied from interface:ExpressionWithVariableParametersAdds the parameter expression.- Specified by:
addParameterin interfaceExpressionWithVariableParameters- Parameters:
param- the expression
-
doneWithParameters
Description copied from interface:ExpressionWithVariableParametersThis method must be called after all the parameters have been set. It checks if the parameter count is correct when required by the implementation.- Specified by:
doneWithParametersin interfaceExpressionWithVariableParameters- Throws:
DbException- if the parameter count is incorrect.
-
getValue
Get a result with.- Parameters:
session- the session- Returns:
- the result
-
getValueTemplate
Get an empty result with the column names set.- Parameters:
session- the session- Returns:
- the empty result
-
optimize
Try to optimize this table function- Parameters:
session- the session
-
isDeterministic
public abstract boolean isDeterministic()Whether the function always returns the same result for the same parameters.- Returns:
- true if it does
-
getSQL
Description copied from interface:HasSQLAppends the SQL statement of this object to the specified builder.
-