Visitablepublic final class NumericConstantNode extends ConstantNode
| Modifier and Type | Field | Description |
|---|---|---|
(package private) static int |
K_BIGINT |
|
(package private) static int |
K_DECIMAL |
|
(package private) static int |
K_DOUBLE |
|
(package private) static int |
K_INT |
|
(package private) static int |
K_REAL |
|
(package private) static int |
K_SMALLINT |
|
(package private) static int |
K_TINYINT |
|
(package private) int |
kind |
This class is used to hold logically different objects for
space efficiency.
|
valueAUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEXtransformed| Constructor | Description |
|---|---|
NumericConstantNode(TypeId t,
java.lang.Number value,
ContextManager cm) |
|
NumericConstantNode(TypeId t,
ContextManager cm) |
Constructor for a typed null node
|
| Modifier and Type | Method | Description |
|---|---|---|
(package private) void |
generateConstant(ExpressionClassBuilder acb,
MethodBuilder mb) |
This generates the proper constant.
|
(package private) java.lang.Object |
getConstantValueAsObject() |
Return an Object representing the bind time value of this
expression tree.
|
private int |
getKind(TypeId t) |
|
private int |
getMaxWidth(TypeId t,
java.lang.Object val) |
|
private int |
getPrecision(TypeId t,
java.lang.Number val) |
|
private int |
getScale(TypeId t,
java.lang.Object val) |
|
(package private) boolean |
isSameNodeKind(ValueNode o) |
Some node classes represent several logical node types (to reduce
footprint), which we call kinds.
|
private void |
setValue(TypeId t,
java.lang.Number value) |
bindExpression, constantExpression, generateExpression, getClone, getOrderableVariantType, getValue, isCloneable, isConstantExpression, isEquivalent, isNull, setValue, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaccept, acceptChildren, addTag, addUDTUsagePriv, addUDTUsagePriv, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, copyTagsFrom, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContext, getContextManager, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getLongProperty, getNullNode, getOffsetOrderedNodes, getOptimizerFactory, getOptimizerTracer, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, getUDTDesc, isAtomic, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, optimizerTracingIsOn, orReliability, parseSearchCondition, parseStatement, printLabel, printSubNodes, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, treePrint, treePrint, verifyClassExistbindExpression, categorize, changeToCNF, checkIsBoolean, checkTopPredicatesForEqualsConditions, copyFields, eliminateNots, evaluateConstantExpressions, genEqualsFalseTree, generate, genIsNullTree, genSQLJavaSQLTree, getColumnName, getDataValueFactory, getSchemaName, getSourceResultColumn, getTableName, getTablesReferenced, getTransformed, getTypeCompiler, getTypeId, getTypeServices, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isInListProbeNode, isParameterNode, isRelationalOperator, optimizableEqualityNode, preprocess, putAndsOnTop, remapColumnReferencesToExpressions, requiresTypeFromContext, selectivity, setCollationInfo, setCollationInfo, setCollationUsingCompilationSchema, setCollationUsingCompilationSchema, setNullability, setTransformed, setType, setType, setType, updatableByCursor, verifyChangeToCNF, verifyEliminateNots, verifyPutAndsOnTopstatic final int K_TINYINT
static final int K_SMALLINT
static final int K_INT
static final int K_BIGINT
static final int K_DECIMAL
static final int K_DOUBLE
static final int K_REAL
final int kind
kind represents the logical object
type. See also ValueNode.isSameNodeKind(org.apache.derby.impl.sql.compile.ValueNode).NumericConstantNode(TypeId t, ContextManager cm) throws StandardException
t - typecm - context managerStandardExceptionNumericConstantNode(TypeId t, java.lang.Number value, ContextManager cm) throws StandardException
value - An object containing the value of the constant.cm - context managerStandardExceptionprivate int getPrecision(TypeId t, java.lang.Number val) throws StandardException
StandardExceptionprivate int getScale(TypeId t, java.lang.Object val) throws StandardException
StandardExceptionprivate int getMaxWidth(TypeId t, java.lang.Object val) throws StandardException
StandardExceptionprivate int getKind(TypeId t)
private void setValue(TypeId t, java.lang.Number value) throws StandardException
StandardExceptionjava.lang.Object getConstantValueAsObject()
throws StandardException
getConstantValueAsObject in class ValueNodeStandardException - Thrown on errorvoid generateConstant(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
generateConstant in class ConstantNodeacb - The ExpressionClassBuilder for the class being builtmb - The method the expression will go intoStandardException - Thrown on errorboolean isSameNodeKind(ValueNode o)
ValueNodeValueNode.isEquivalent(org.apache.derby.impl.sql.compile.ValueNode)
cannot always just use instanceof to check if the other node
represents the same kind. Hence this method needs to be
overridden by all node classes that represent several kinds.
This default implementation does not look at kinds.
It is only called from implementations of isEquivalent.isSameNodeKind in class ValueNodeo - The other value node whose kind we want to compare with.true if this and o represent the same
logical node type, i.e. kind.Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.