Visitable
GetCurrentConnectionNode
, MethodCallNode
, SQLToJavaValueNode
, StaticClassFieldReferenceNode
abstract class JavaValueNode extends QueryTreeNode
Modifier and Type | Field | Description |
---|---|---|
private int |
collationType |
|
protected boolean |
forCallStatement |
|
protected JSQLType |
jsqlType |
|
private boolean |
mustCastToPrimitive |
|
private LocalField |
receiverField |
|
private boolean |
returnValueDiscarded |
|
private boolean |
valueReturnedToSQLDomain |
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
Constructor | Description |
---|---|
JavaValueNode(ContextManager cm) |
Modifier and Type | Method | Description |
---|---|---|
(package private) abstract JavaValueNode |
bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.List<AggregateNode> aggregates) |
|
(package private) void |
castToPrimitive(boolean booleanValue) |
Toggles whether the code generator should add a cast to extract a primitive
value from an object.
|
(package private) abstract boolean |
categorize(JBitSet referencedTabs,
boolean simplePredsOnly) |
|
(package private) void |
checkReliability(ValueNode sqlNode) |
Check the reliability type of this java value.
|
(package private) void |
generate(ActivationClassBuilder acb,
MethodBuilder mb) |
Do the code generation for this node.
|
(package private) abstract void |
generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb) |
General logic shared by Core compilation and by the Replication Filter
compiler.
|
(package private) boolean |
generateReceiver(ExpressionClassBuilder acb,
MethodBuilder mb) |
Generate the expression that evaluates to the receiver.
|
(package private) boolean |
generateReceiver(ExpressionClassBuilder acb,
MethodBuilder mb,
JavaValueNode receiver) |
Generate the expression that evaluates to the receiver.
|
(package private) int |
getCollationType() |
|
(package private) java.lang.Object |
getConstantValueAsObject() |
|
(package private) DataTypeDescriptor |
getDataType() |
Get the resolved data type of this node.
|
(package private) java.lang.String |
getJavaTypeName() |
|
(package private) JSQLType |
getJSQLType() |
Get the JSQLType that corresponds to this node.
|
(package private) int |
getOrderableVariantType() |
Return the variant type for the underlying expression.
|
(package private) java.lang.String |
getPrimitiveTypeName() |
|
(package private) void |
getReceiverExpression(ExpressionClassBuilder acb,
MethodBuilder mb,
JavaValueNode receiver) |
Get an expression that has the value of the receiver.
|
(package private) boolean |
isPrimitiveType() |
|
(package private) static TypeId |
mapToTypeID(JSQLType jsqlType) |
Map a JSQLType to a compilation type id.
|
(package private) void |
markForCallStatement() |
Mark this node as being for a CALL Statement.
|
(package private) void |
markReturnValueDiscarded() |
Tell this node that nothing is done with the returned value
|
(package private) boolean |
mustCastToPrimitive() |
Reports whether the code generator should add a cast to extract a primitive
value from an object.
|
(package private) abstract void |
preprocess(int numTables,
FromList outerFromList,
SubqueryList outerSubqueryList,
PredicateList outerPredicateList) |
|
(package private) abstract JavaValueNode |
remapColumnReferencesToExpressions() |
|
(package private) boolean |
returnValueDiscarded() |
Tell whether the return value from this node is discarded
|
(package private) void |
returnValueToSQLDomain() |
Inform this node that it returns its value to the SQL domain
|
(package private) void |
setCollationType(int type) |
Set the collation type.
|
(package private) void |
setJavaTypeName(java.lang.String javaTypeName) |
|
(package private) boolean |
valueReturnedToSQLDomain() |
Tell whether this node returns its value to the SQL domain
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
accept, 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, toString, treePrint, treePrint, verifyClassExist
private boolean mustCastToPrimitive
protected boolean forCallStatement
private boolean valueReturnedToSQLDomain
private boolean returnValueDiscarded
protected JSQLType jsqlType
private LocalField receiverField
private int collationType
JavaValueNode(ContextManager cm)
DataTypeDescriptor getDataType() throws StandardException
StandardException
final boolean isPrimitiveType() throws StandardException
StandardException
java.lang.String getJavaTypeName() throws StandardException
StandardException
final void setJavaTypeName(java.lang.String javaTypeName)
java.lang.String getPrimitiveTypeName() throws StandardException
StandardException
final void castToPrimitive(boolean booleanValue)
booleanValue
- true if we want the code generator to add a cast
false otherwisefinal boolean mustCastToPrimitive()
JSQLType getJSQLType() throws StandardException
StandardException
static TypeId mapToTypeID(JSQLType jsqlType) throws StandardException
jsqlType
- the universal type to mapStandardException
final void markForCallStatement()
abstract JavaValueNode remapColumnReferencesToExpressions() throws StandardException
StandardException
- Thrown on errorValueNode.remapColumnReferencesToExpressions()
abstract boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly) throws StandardException
StandardException
- Thrown on errorValueNode.categorize(org.apache.derby.iapi.util.JBitSet, boolean)
abstract JavaValueNode bindExpression(FromList fromList, SubqueryList subqueryList, java.util.List<AggregateNode> aggregates) throws StandardException
StandardException
- Thrown on errorValueNode.bindExpression(org.apache.derby.impl.sql.compile.FromList, org.apache.derby.impl.sql.compile.SubqueryList, java.util.List<org.apache.derby.impl.sql.compile.AggregateNode>)
abstract void preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException
java.lang.Object getConstantValueAsObject() throws StandardException
StandardException
- Thrown on errorValueNode.getConstantValueAsObject()
final void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException
generate
in class QueryTreeNode
acb
- The ActivationClassBuilder for the class being builtmb
- the method the expression will go intoStandardException
- Thrown on errorboolean generateReceiver(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
acb
- The ExpressionClassBuilder for the class being builtmb
- the method the expression will go intoStandardException
- Thrown on errorint getOrderableVariantType() throws StandardException
StandardException
abstract void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
acb
- The ExpressionClassBuilder for the class being builtmb
- the method the expression will go intoStandardException
- Thrown on errorfinal boolean generateReceiver(ExpressionClassBuilder acb, MethodBuilder mb, JavaValueNode receiver) throws StandardException
acb
- The ActivationClassBuilder for the class being builtmb
- the method the expression will go intoreceiver
- The query tree form of the receiver expressionStandardException
- Thrown on errorfinal void getReceiverExpression(ExpressionClassBuilder acb, MethodBuilder mb, JavaValueNode receiver) throws StandardException
acb
- The ExpressionClassBuilder for the class we're generatingmb
- the method the expression will go intoreceiver
- The query tree form of the receiver expressionStandardException
- Thrown on errorvoid returnValueToSQLDomain()
boolean valueReturnedToSQLDomain()
void markReturnValueDiscarded()
boolean returnValueDiscarded()
void checkReliability(ValueNode sqlNode) throws StandardException
StandardException
- Thrown on errorCompilerContext
int getCollationType()
void setCollationType(int type)
type
- one of StringDataValue.COLLATION_TYPE_UCS_BASIC
or
StringDataValue.COLLATION_TYPE_TERRITORY_BASED
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.