org.apache.derby.impl.sql.compile
Class ValueNode
- java.lang.Object
-
- org.apache.derby.impl.sql.compile.QueryTreeNode
-
- org.apache.derby.impl.sql.compile.ValueNode
-
- All Implemented Interfaces:
- Visitable
- Direct Known Subclasses:
- BinaryArithmeticOperatorNode, BinaryComparisonOperatorNode, BinaryListOperatorNode, BooleanConstantNode, CharConstantNode, ColumnReference, DB2LengthOperatorNode, DefaultNode, LengthOperatorNode, LikeEscapeOperatorNode, NumericConstantNode, ParameterNode, UnaryComparisonOperatorNode, UnaryLogicalOperatorNode, UntypedNullConstantNode, VarbitConstantNode, WindowFunctionNode, XMLConstantNode
public abstract class ValueNode extends QueryTreeNode
A ValueNode is an abstract class for all nodes that can represent data values, that is, constants, columns, and expressions.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ValueNodecheckIsBoolean()Bind time logic.doubleselectivity(Optimizable optTable)The default selectivity for value nodes is 50%.voidsetCollationInfo(DataTypeDescriptor collationInfoType)Set the collation type and derivation of this node based upon the collation information in the passed in type.voidsetCollationInfo(int collationType, int collationDerivation)Set the collation type and derivation of this node based upon the collation information passed in.voidsetNullability(boolean nullability)Set the nullability of this value.java.lang.StringtoString()Convert this object to a String.booleanupdatableByCursor()-
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
accept, addTag, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, createTypeDependency, getBeginOffset, getDataDictionary, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getOffsetOrderedNodes, getOptimizerFactory, getOptimizerTracer, getParameterTypes, getUDTDesc, isAtomic, makeConstantAction, makeTableName, makeTableName, optimizerTracingIsOn, orReliability, referencesSessionSchema, setBeginOffset, setEndOffset, taggedWith, treePrint
-
-
-
-
Method Detail
-
toString
public java.lang.String toString()
Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing.- Overrides:
toStringin classQueryTreeNode- Returns:
- This object as a String
-
setNullability
public void setNullability(boolean nullability) throws StandardExceptionSet the nullability of this value.- Throws:
StandardException
-
setCollationInfo
public void setCollationInfo(DataTypeDescriptor collationInfoType) throws StandardException
Set the collation type and derivation of this node based upon the collation information in the passed in type. Note that the base type of this node is not changed (e.g. INTEGER), only its collation settings. This may result in a different object being returned from getTypeServices().- Parameters:
collationInfoType- Type to take collation type and derivation from.- Throws:
StandardException- Error setting type.
-
setCollationInfo
public void setCollationInfo(int collationType, int collationDerivation) throws StandardExceptionSet the collation type and derivation of this node based upon the collation information passed in. This may result in a different object being returned from getTypeServices().- Parameters:
collationType- Collation typecollationDerivation- Collation derivation- Throws:
StandardException- Error setting type
-
updatableByCursor
public boolean updatableByCursor()
- Returns:
- the default updatability for an expression - false
-
checkIsBoolean
public ValueNode checkIsBoolean() throws StandardException
Bind time logic. Raises an error if this ValueNode does not resolve to a boolean value. This method is called by WHERE clauses.- Returns:
- bound coercion of this node to a builtin type as necessary
- Throws:
StandardException- Thrown on error
-
selectivity
public double selectivity(Optimizable optTable) throws StandardException
The default selectivity for value nodes is 50%. This is overridden in specific cases, such as the RelationalOperators.- Throws:
StandardException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG