Top Description Fields Constructors Methods
org.hsqldb

public Class ExpressionTable

extends Expression
Class Inheritance
Imports
org.hsqldb.error.Error, .ErrorCode, org.hsqldb.lib.ArrayUtil, org.hsqldb.map.ValuePool, org.hsqldb.navigator.RowSetNavigator, .RowSetNavigatorData, org.hsqldb.persist.PersistentStore, org.hsqldb.result.Result, org.hsqldb.types.RowType, .Type

Implementation of table conversion.
Author
Fred Toussi (fredt@users dot sourceforge.net)
Since
2.0.0
Version
2.6.0

Field Summary

Modifier and TypeField and Description
pack-priv boolean
pack-priv boolean
Inherited from org.hsqldb.Expression:
aliasBINARYcollationcolumnIndexdataTypeemptyArrayEXPR_FALSEEXPR_TRUEexprSubTypegroupingTypeisColumnConditionisColumnEqualisCorrelatedisDistinctAggregateisSingleColumnConditionisSingleColumnEqualisSingleColumnNotNullisSingleColumnNullLEFTnodeDataTypesnodesnoOptimisationnullabilityopTypeparameterIndexrangeGrouprangeGroupsresultTableColumnIndexRIGHTtableTERNARYTHIRDUNARYvalueData

Constructor Summary

AccessConstructor and Description
pack-priv
ExpressionTable(Expression[] e, boolean ordinality)

Creates an UNNEST ARRAY or MULTISET expression

Method Summary

Modifier and TypeMethod and Description
protected String
describe(Session session, int blanks)

Overrides org.hsqldb.Expression.describe.

public Result
public Object[]
public String
getSQL()

Overrides org.hsqldb.Expression.getSQL.

For use with CHECK constraints.

public Object
public Object
private void
private void
pack-priv void
insertValuesIntoSubqueryTable(Session session, PersistentStore store)

Overrides org.hsqldb.Expression.insertValuesIntoSubqueryTable.

Details of IN condition optimisation for 1.9.0 Predicates with SELECT are QUERY expressions Predicates with IN list Parser adds a SubQuery to the list for each predicate At type resolution IN lists that are entirely fixed constant or parameter values are selected for possible optimisation.

public void
Inherited from org.hsqldb.Expression:
checkValidCheckConstraintcollectAllExpressionscollectAllSubqueriescollectObjectNamescollectRangeVariablescollectRangeVariablesconvertToTypecostFactorcountNullsduplicateequalsequalsequalsequalsgetAggregatedValuegetAliasgetCheckSelectgetColumngetColumnIndexgetColumnNamegetConditiongetConstantValueNoCheckgetContextSQLgetDataTypegetDegreegetIndexableExpressiongetJoinRangeVariablesgetLeftNodegetNodeDataTypegetNodeDataTypesgetNullabilitygetRangeVariablegetRightNodegetSimpleNamegetSubqueriesgetSubTypegetTablegetTypegetUnkeyedColumnsgetValueClassNamehasAggregatehasConditionhashCodehasNonDeterministicFunctionhasReferencehasReferenceisComposedOfisComposedOfisConditionRangeVariableisCorrelatedisDistinctAggregateisDynamicParamisFalseisIndexableisSelfAggregateisTrueisUnresolvedParammaterialiseprepareTablereplaceAliasInOrderByreplaceColumnReferencesreplaceExpressionsreplaceNodereplaceRangeVariablesresetColumnReferencesresolveCheckOrGenExpressionresolveColumnReferencesresolveColumnReferencesresolveColumnSetresolveColumnSetresolveGrantFiltersetAggregatesetAliassetAsConstantValuesetAsConstantValuesetAttributesAsColumnsetCollationsetConditionsetCorrelatedReferencessetDataTypesetLeftNodesetNoOptimisationsetRightNodesetSubTypeswapLeftAndRightNodestestConditionupdateAggregatingValueupdateAggregatingValue

Field Detail

isTableback to summary
pack-priv boolean isTable
ordinalityback to summary
pack-priv boolean ordinality

Constructor Detail

ExpressionTableback to summary
pack-priv ExpressionTable(Expression[] e, boolean ordinality)

Creates an UNNEST ARRAY or MULTISET expression

Method Detail

describeback to summary
protected String describe(Session session, int blanks)

Overrides org.hsqldb.Expression.describe.

getResultback to summary
public Result getResult(Session session)

Overrides org.hsqldb.Expression.getResult.

getRowValueback to summary
public Object[] getRowValue(Session session)

Overrides org.hsqldb.Expression.getRowValue.

getSQLback to summary
public String getSQL()

Overrides org.hsqldb.Expression.getSQL.

Doc from org.hsqldb.Expression.getSQL.

For use with CHECK constraints. Under development. Currently supports a subset of expressions and is suitable for CHECK search conditions that refer only to the inserted/updated row. For full DDL reporting of VIEW select queries and CHECK search conditions, future improvements here are dependent upon improvements to SELECT query parsing, so that it is performed in a number of passes. An early pass should result in the query turned into an Expression tree that contains the information in the original SQL without any alterations, and with tables and columns all resolved. This Expression can then be preserved for future use. Table and column names that are not user-defined aliases should be kept as the HsqlName structures so that table or column renaming is reflected in the precompiled query.

getValueback to summary
public Object getValue(Session session, Type type)

Overrides org.hsqldb.Expression.getValue.

getValueback to summary
public Object getValue(Session session)

Overrides org.hsqldb.Expression.getValue.

insertArrayValuesback to summary
private void insertArrayValues(Session session, PersistentStore store)
insertTableValuesback to summary
private void insertTableValues(Session session, PersistentStore store)
insertValuesIntoSubqueryTableback to summary
pack-priv void insertValuesIntoSubqueryTable(Session session, PersistentStore store)

Overrides org.hsqldb.Expression.insertValuesIntoSubqueryTable.

Doc from org.hsqldb.Expression.insertValuesIntoSubqueryTable.

Details of IN condition optimisation for 1.9.0 Predicates with SELECT are QUERY expressions Predicates with IN list Parser adds a SubQuery to the list for each predicate At type resolution IN lists that are entirely fixed constant or parameter values are selected for possible optimisation. The flags: IN expression right side isCorrelated == true if there are non-constant, non-param expressions in the list (Expressions may have to be resolved against the full set of columns of the query, so must be re-evaluated for each row and evaluated after all the joins have been made) VALUELIST expression isFixedConstantValueList == true when all expressions are fixed constant and none is a param. With this flag, a single-column VALUELIST can be accessed as a HashMap. Predicates may be optimised as joins if isCorrelated == false

resolveTypesback to summary
public void resolveTypes(Session session, Expression parent)

Overrides org.hsqldb.Expression.resolveTypes.