Top Description Fields Constructors Methods
org.h2.expression.function.table

public final Class JavaTableFunction

extends TableFunction
Class Inheritance
Imports
org.h2.api.ErrorCode, org.h2.engine.SessionLocal, org.h2.expression.Expression, org.h2.message.DbException, org.h2.result.ResultInterface, org.h2.schema.FunctionAlias

This class wraps a user-defined function.

Field Summary

Modifier and TypeField and Description
private final FunctionAlias
private final FunctionAlias.JavaMethod
Inherited from org.h2.expression.function.table.TableFunction:
args

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
public StringBuilder
getSQL(StringBuilder
string builder
builder
,
int
formatting flags
sqlFlags
)

Overrides org.h2.expression.function.table.TableFunction.getSQL.

Implements org.h2.util.HasSQL.getSQL.

Appends the SQL statement of this object to the specified builder.

public ResultInterface
getValue(SessionLocal
the session
session
)

Implements abstract org.h2.expression.function.table.TableFunction.getValue.

Get a result with.

public ResultInterface
getValueTemplate(SessionLocal
the session
session
)

Implements abstract org.h2.expression.function.table.TableFunction.getValueTemplate.

Get an empty result with the column names set.

public boolean
isDeterministic()

Implements abstract org.h2.expression.function.table.TableFunction.isDeterministic.

Whether the function always returns the same result for the same parameters.

public void
optimize(SessionLocal
the session
session
)

Overrides org.h2.expression.function.table.TableFunction.optimize.

Try to optimize this table function

Inherited from org.h2.expression.function.table.TableFunction:
addParameterdoneWithParameters

Field Detail

functionAliasback to summary
private final FunctionAlias functionAlias
javaMethodback to summary
private final FunctionAlias.JavaMethod javaMethod

Constructor Detail

JavaTableFunctionback to summary
public JavaTableFunction(FunctionAlias functionAlias, Expression[] args)

Method Detail

getNameback to summary
public String getName()

Implements org.h2.expression.function.NamedExpression.getName.

Doc from org.h2.expression.function.NamedExpression.getName.

Get the name.

Returns:String

the name in uppercase

Annotations
@Override
getSQLback to summary
public StringBuilder getSQL(StringBuilder builder, int sqlFlags)

Overrides org.h2.expression.function.table.TableFunction.getSQL.

Implements org.h2.util.HasSQL.getSQL.

Doc from org.h2.util.HasSQL.getSQL.

Appends the SQL statement of this object to the specified builder.

Parameters
builder:StringBuilder

string builder

sqlFlags:int

formatting flags

Returns:StringBuilder

the specified string builder

Annotations
@Override
getValueback to summary
public ResultInterface getValue(SessionLocal session)

Implements abstract org.h2.expression.function.table.TableFunction.getValue.

Doc from org.h2.expression.function.table.TableFunction.getValue.

Get a result with.

Parameters
session:SessionLocal

the session

Returns:ResultInterface

the result

Annotations
@Override
getValueTemplateback to summary
public ResultInterface getValueTemplate(SessionLocal session)

Implements abstract org.h2.expression.function.table.TableFunction.getValueTemplate.

Doc from org.h2.expression.function.table.TableFunction.getValueTemplate.

Get an empty result with the column names set.

Parameters
session:SessionLocal

the session

Returns:ResultInterface

the empty result

Annotations
@Override
isDeterministicback to summary
public boolean isDeterministic()

Implements abstract org.h2.expression.function.table.TableFunction.isDeterministic.

Doc from org.h2.expression.function.table.TableFunction.isDeterministic.

Whether the function always returns the same result for the same parameters.

Returns:boolean

true if it does

Annotations
@Override
optimizeback to summary
public void optimize(SessionLocal session)

Overrides org.h2.expression.function.table.TableFunction.optimize.

Doc from org.h2.expression.function.table.TableFunction.optimize.

Try to optimize this table function

Parameters
session:SessionLocal

the session

Annotations
@Override