Top Description Fields Constructors Methods
org.h2.table

public final Class CTE

extends QueryExpressionTable
Class Inheritance
Imports
java.util.ArrayList, org.h2.command.QueryScope, org.h2.command.query.Query, org.h2.engine.SessionLocal, org.h2.expression.Parameter, org.h2.index.QueryExpressionIndex, .RecursiveIndex, .RegularQueryExpressionIndex, org.h2.result.ResultInterface, org.h2.util.ParserUtil

A common table expression.

Field Summary

Modifier and TypeField and Description
private final ArrayList<Parameter>
private final QueryScope
private final String
private final boolean
private ResultInterface
Inherited from org.h2.table.QueryExpressionTable:
tablesviewQuery

Constructor Summary

AccessConstructor and Description
public
CTE(String name, Query query, String querySQL, ArrayList<Parameter> params, Column[] columnTemplates, SessionLocal session, boolean recursive, QueryScope queryScope)

Method Summary

Modifier and TypeMethod and Description
public boolean
canDrop()

Implements abstract org.h2.table.Table.canDrop.

Check if this table can be dropped.

protected QueryExpressionIndex
public String
getCreateSQL()

Implements abstract org.h2.engine.DbObject.getCreateSQL.

Construct the CREATE ...

public QueryScope
getQueryScope()

Implements abstract org.h2.table.QueryExpressionTable.getQueryScope.

Returns the scope of this table

public String
public ResultInterface
public StringBuilder
getSQL(StringBuilder
string builder
builder
,
int
formatting flags
sqlFlags
)

Overrides org.h2.schema.SchemaObject.getSQL.

Implements org.h2.util.HasSQL.getSQL.

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

public TableType
getTableType()

Implements abstract org.h2.table.Table.getTableType.

Get the table type name

public Query
public boolean
isDeterministic()

Overrides org.h2.table.QueryExpressionTable.isDeterministic.

Check if the table is deterministic.

public boolean
public void
Inherited from org.h2.table.QueryExpressionTable:
addDependenciesaddIndexaddRowcanGetRowCountcanReferencecheckSupportAlterclosecreateQueryColumnTemplateListgetBestPlanItemgetIndexesgetMaxDataModificationIdgetParameterOffsetgetQuerygetRowCountgetRowCountApproximationgetScanIndexgetScanIndexinitColumnsisInsertableisQueryComparableisViewremoveRowtruncate

Field Detail

originalParametersback to summary
private final ArrayList<Parameter> originalParameters
queryScopeback to summary
private final QueryScope queryScope
querySQLback to summary
private final String querySQL
recursiveback to summary
private final boolean recursive
recursiveResultback to summary
private ResultInterface recursiveResult

Constructor Detail

CTEback to summary
public CTE(String name, Query query, String querySQL, ArrayList<Parameter> params, Column[] columnTemplates, SessionLocal session, boolean recursive, QueryScope queryScope)

Method Detail

canDropback to summary
public boolean canDrop()

Implements abstract org.h2.table.Table.canDrop.

Doc from org.h2.table.Table.canDrop.

Check if this table can be dropped.

Returns:boolean

true if it can

Annotations
@Override
createIndexback to summary
protected QueryExpressionIndex createIndex(SessionLocal session, int[] masks)

Implements abstract org.h2.table.QueryExpressionTable.createIndex.

Annotations
@Override
getCreateSQLback to summary
public String getCreateSQL()

Implements abstract org.h2.engine.DbObject.getCreateSQL.

Doc from org.h2.engine.DbObject.getCreateSQL.

Construct the CREATE ... SQL statement for this object.

Returns:String

the SQL statement

Annotations
@Override
getQueryScopeback to summary
public QueryScope getQueryScope()

Implements abstract org.h2.table.QueryExpressionTable.getQueryScope.

Doc from org.h2.table.QueryExpressionTable.getQueryScope.

Returns the scope of this table

Returns:QueryScope

the scope of this table

Annotations
@Override
getQuerySQLback to summary
public String getQuerySQL()
getRecursiveResultback to summary
public ResultInterface getRecursiveResult()
getSQLback to summary
public StringBuilder getSQL(StringBuilder builder, int sqlFlags)

Overrides org.h2.schema.SchemaObject.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
getTableTypeback to summary
public TableType getTableType()

Implements abstract org.h2.table.Table.getTableType.

Doc from org.h2.table.Table.getTableType.

Get the table type name

Returns:TableType

the table type name

Annotations
@Override
getTopQueryback to summary
public Query getTopQuery()

Implements abstract org.h2.table.QueryExpressionTable.getTopQuery.

Annotations
@Override
isDeterministicback to summary
public boolean isDeterministic()

Overrides org.h2.table.QueryExpressionTable.isDeterministic.

Doc from org.h2.table.Table.isDeterministic.

Check if the table is deterministic.

Returns:boolean

true if it is

Annotations
@Override
isRecursiveback to summary
public boolean isRecursive()
setRecursiveResultback to summary
public void setRecursiveResult(ResultInterface value)