org.hsqldb
Class Expression
- java.lang.Object
-
- org.hsqldb.Expression
-
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- ExpressionAccessor, ExpressionAggregate, ExpressionArithmetic, ExpressionArrayAggregate, ExpressionColumn, ExpressionColumnAccessor, ExpressionLogical, ExpressionOp, ExpressionOrderBy, ExpressionTable, ExpressionValue, FunctionSQL, FunctionSQLInvoked
public class Expression extends java.lang.Object implements java.lang.CloneableExpression class.- Since:
- 1.9.0
-
-
Field Summary
Fields Modifier and Type Field and Description static intBINARYstatic intLEFTstatic intRIGHTstatic intTERNARYstatic intUNARY
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidcheckValidCheckConstraint()checkValidCheckConstraintExpressionduplicate()booleanequals(Expression other)booleanequals(java.lang.Object other)java.lang.ObjectgetAggregatedValue(Session session, java.lang.Object currValue)ColumnSchemagetColumn()ExpressiongetCondition()java.lang.ObjectgetConstantValueNoCheck(Session session)ResultgetResult(Session session)java.lang.Object[]getRowValue(Session session)java.lang.StringgetSQL()For use with CHECK constraints.OrderedHashSetgetSubqueries()TablegetTable()intgetType()Returns the type of expressionOrderedHashSetgetUnkeyedColumns(OrderedHashSet unresolvedSet)java.lang.ObjectgetValue(Session session)booleanhasCondition()inthashCode()booleanisCorrelated()isCorrelatedbooleanisFalse()booleanisIndexable(RangeVariable range)booleanisTrue()voidmaterialise(Session session)voidresolveCheckOrGenExpression(Session session, RangeGroup rangeGroup, boolean isCheck)HsqlListresolveColumnReferences(Session session, RangeGroup rangeGroup, int rangeCount, RangeGroup[] rangeGroups, HsqlList unresolvedSet, boolean acceptsSequences)HsqlListresolveColumnReferences(Session session, RangeGroup rangeGroup, RangeGroup[] rangeGroups, HsqlList unresolvedSet)resolve tables and collect unresolved column expressionsvoidresolveTypes(Session session, Expression parent)voidsetCollation(Collation collation)voidsetCondition(Expression e)booleantestCondition(Session session)java.lang.ObjectupdateAggregatingValue(Session session, java.lang.Object currValue)
-
-
-
Field Detail
-
LEFT
public static final int LEFT
- See Also:
- Constant Field Values
-
RIGHT
public static final int RIGHT
- See Also:
- Constant Field Values
-
UNARY
public static final int UNARY
- See Also:
- Constant Field Values
-
BINARY
public static final int BINARY
- See Also:
- Constant Field Values
-
TERNARY
public static final int TERNARY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSQL
public java.lang.String 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.
-
equals
public boolean equals(Expression other)
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getType
public int getType()
Returns the type of expression
-
resolveColumnReferences
public HsqlList resolveColumnReferences(Session session, RangeGroup rangeGroup, RangeGroup[] rangeGroups, HsqlList unresolvedSet)
resolve tables and collect unresolved column expressions
-
resolveColumnReferences
public HsqlList resolveColumnReferences(Session session, RangeGroup rangeGroup, int rangeCount, RangeGroup[] rangeGroups, HsqlList unresolvedSet, boolean acceptsSequences)
-
getUnkeyedColumns
public OrderedHashSet getUnkeyedColumns(OrderedHashSet unresolvedSet)
-
resolveTypes
public void resolveTypes(Session session, Expression parent)
-
getColumn
public ColumnSchema getColumn()
-
getTable
public Table getTable()
-
materialise
public void materialise(Session session)
-
getConstantValueNoCheck
public java.lang.Object getConstantValueNoCheck(Session session)
-
getRowValue
public java.lang.Object[] getRowValue(Session session)
-
getValue
public java.lang.Object getValue(Session session)
-
testCondition
public boolean testCondition(Session session)
-
isTrue
public boolean isTrue()
-
isFalse
public boolean isFalse()
-
isIndexable
public boolean isIndexable(RangeVariable range)
-
resolveCheckOrGenExpression
public void resolveCheckOrGenExpression(Session session, RangeGroup rangeGroup, boolean isCheck)
-
getSubqueries
public OrderedHashSet getSubqueries()
-
isCorrelated
public boolean isCorrelated()
isCorrelated
-
checkValidCheckConstraint
public void checkValidCheckConstraint()
checkValidCheckConstraint
-
duplicate
public Expression duplicate()
-
updateAggregatingValue
public java.lang.Object updateAggregatingValue(Session session, java.lang.Object currValue)
-
getAggregatedValue
public java.lang.Object getAggregatedValue(Session session, java.lang.Object currValue)
-
getCondition
public Expression getCondition()
-
hasCondition
public boolean hasCondition()
-
setCondition
public void setCondition(Expression e)
-
setCollation
public void setCollation(Collation collation)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG