abstract class JavaValueNode extends QueryTreeNode
Modifier and Type | Field and 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_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired
Constructor and Description |
---|
JavaValueNode() |
Modifier and Type | Method and Description |
---|---|
(package private) abstract JavaValueNode |
bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.List aggregateVector) |
void |
castToPrimitive(boolean booleanValue)
Toggles whether the code generator should add a cast to extract a primitive
value from an object.
|
abstract boolean |
categorize(JBitSet referencedTabs,
boolean simplePredsOnly) |
void |
checkReliability(ValueNode sqlNode)
Check the reliability type of this java value.
|
protected void |
generate(ActivationClassBuilder acb,
MethodBuilder mb)
Do the code generation for this node.
|
protected abstract void |
generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb)
General logic shared by Core compilation and by the Replication Filter
compiler.
|
protected boolean |
generateReceiver(ExpressionClassBuilder acb,
MethodBuilder mb)
Generate the expression that evaluates to the receiver.
|
protected boolean |
generateReceiver(ExpressionClassBuilder acb,
MethodBuilder mb,
JavaValueNode receiver)
Generate the expression that evaluates to the receiver.
|
int |
getCollationType() |
(package private) java.lang.Object |
getConstantValueAsObject() |
DataTypeDescriptor |
getDataType()
Get the resolved data type of this node.
|
java.lang.String |
getJavaTypeName() |
JSQLType |
getJSQLType()
Get the JSQLType that corresponds to this node.
|
protected int |
getOrderableVariantType()
Return the variant type for the underlying expression.
|
java.lang.String |
getPrimitiveTypeName() |
protected void |
getReceiverExpression(ExpressionClassBuilder acb,
MethodBuilder mb,
JavaValueNode receiver)
Get an expression that has the value of the receiver.
|
boolean |
isPrimitiveType() |
static TypeId |
mapToTypeID(JSQLType jsqlType)
Map a JSQLType to a compilation type id.
|
void |
markForCallStatement()
Mark this node as being for a CALL Statement.
|
protected void |
markReturnValueDiscarded()
Tell this node that nothing is done with the returned value
|
boolean |
mustCastToPrimitive()
Reports whether the code generator should add a cast to extract a primitive
value from an object.
|
abstract void |
preprocess(int numTables,
FromList outerFromList,
SubqueryList outerSubqueryList,
PredicateList outerPredicateList) |
abstract JavaValueNode |
remapColumnReferencesToExpressions() |
protected boolean |
returnValueDiscarded()
Tell whether the return value from this node is discarded
|
protected void |
returnValueToSQLDomain()
Inform this node that it returns its value to the SQL domain
|
void |
setCollationType(int type)
Set the collation type.
|
void |
setJavaTypeName(java.lang.String javaTypeName) |
protected boolean |
valueReturnedToSQLDomain()
Tell whether this node returns its value to the SQL domain
|
accept, acceptChildren, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, foundString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, init, init, init, isAtomic, isInstanceOf, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, orReliability, parseStatement, printLabel, printSubNodes, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, stackPrint, 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
public DataTypeDescriptor getDataType() throws StandardException
StandardException
public boolean isPrimitiveType() throws StandardException
StandardException
public java.lang.String getJavaTypeName() throws StandardException
StandardException
public void setJavaTypeName(java.lang.String javaTypeName)
public java.lang.String getPrimitiveTypeName() throws StandardException
StandardException
public void castToPrimitive(boolean booleanValue)
booleanValue
- true if we want the code generator to add a cast
false otherwisepublic boolean mustCastToPrimitive()
public JSQLType getJSQLType() throws StandardException
StandardException
public static TypeId mapToTypeID(JSQLType jsqlType) throws StandardException
jsqlType
- the universal type to mapStandardException
public void markForCallStatement()
public abstract JavaValueNode remapColumnReferencesToExpressions() throws StandardException
StandardException
- Thrown on errorValueNode.remapColumnReferencesToExpressions()
public 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 aggregateVector) throws StandardException
StandardException
- Thrown on errorValueNode.bindExpression(org.apache.derby.impl.sql.compile.FromList, org.apache.derby.impl.sql.compile.SubqueryList, java.util.List)
public abstract void preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException
java.lang.Object getConstantValueAsObject() throws StandardException
StandardException
- Thrown on errorValueNode.getConstantValueAsObject()
protected 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 errorprotected boolean generateReceiver(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
acb
- The ExpressionClassBuilder for the class being builtmb
- the method the expression will go intoStandardException
- Thrown on errorprotected int getOrderableVariantType() throws StandardException
StandardException
protected 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 errorprotected final 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 errorprotected final 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 errorprotected void returnValueToSQLDomain()
protected boolean valueReturnedToSQLDomain()
protected void markReturnValueDiscarded()
protected boolean returnValueDiscarded()
public void checkReliability(ValueNode sqlNode) throws StandardException
StandardException
- Thrown on errorCompilerContext
public int getCollationType()
public void setCollationType(int type)
type
- one of StringDataValue.COLLATION_TYPE_UCS_BASIC
or
StringDataValue.COLLATION_TYPE_TERRITORY_BASED
Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.