class SQLToJavaValueNode extends JavaValueNode
Modifier and Type | Field and Description |
---|---|
(package private) LocalField |
returnsNullOnNullState
If set then this SQL value is being passed into a SQL function
declared RETURNS NULL ON NULL input.
|
(package private) ValueNode |
value |
forCallStatement, jsqlType
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
Constructor and Description |
---|
SQLToJavaValueNode(ValueNode value,
ContextManager cm)
Constructor for a SQLToJavaValueNode
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
acceptChildren(Visitor v)
Accept the visitor for all visitable children of this node.
|
(package private) JavaValueNode |
bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.List<AggregateNode> aggregates)
Bind this expression.
|
(package private) boolean |
categorize(JBitSet referencedTabs,
boolean simplePredsOnly)
Categorize this predicate.
|
(package private) void |
generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb)
Generate code to get the Java value out of a SQL value.
|
private void |
generateJavaValue(ExpressionClassBuilder acb,
MethodBuilder mbex)
Generate code to cast the SQLValue to a Java value.
|
private void |
generateReturnsNullOnNullCheck(MethodBuilder mb)
Generate the code for the returns Null on Null input check..
|
private void |
generateSQLValue(ExpressionClassBuilder acb,
MethodBuilder mb)
Generate the SQLvalue that this node wraps.
|
(package private) java.lang.Object |
getConstantValueAsObject() |
(package private) DataTypeDescriptor |
getDataType()
Get the resolved data type of this node.
|
(package private) java.lang.String |
getJavaTypeName()
Returns the name of the java class type that this node coerces to.
|
(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()
Returns the name of the java primitive type that this node coerces to.
|
private java.lang.String |
getSQLValueInterfaceName()
Get the type name of the SQLValue we generate.
|
(package private) ValueNode |
getSQLValueNode()
Get the SQL ValueNode that is being converted to a JavaValueNode
|
(package private) void |
preprocess(int numTables,
FromList outerFromList,
SubqueryList outerSubqueryList,
PredicateList outerPredicateList)
Preprocess an expression tree.
|
(package private) void |
printSubNodes(int depth)
Prints the sub-nodes of this object.
|
(package private) JavaValueNode |
remapColumnReferencesToExpressions()
Remap all ColumnReferences in this tree to be clones of the
underlying expression.
|
castToPrimitive, checkReliability, generate, generateReceiver, generateReceiver, getCollationType, getReceiverExpression, isPrimitiveType, mapToTypeID, markForCallStatement, markReturnValueDiscarded, mustCastToPrimitive, returnValueDiscarded, returnValueToSQLDomain, setCollationType, setJavaTypeName, valueReturnedToSQLDomain
accept, 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, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, toString, treePrint, treePrint, verifyClassExist
ValueNode value
LocalField returnsNullOnNullState
SQLToJavaValueNode(ValueNode value, ContextManager cm)
value
- A ValueNode representing a SQL value to convert to
the Java domain.cm
- The context managervoid printSubNodes(int depth)
printSubNodes
in class QueryTreeNode
depth
- The depth of this node in the treejava.lang.String getJavaTypeName() throws StandardException
getJavaTypeName
in class JavaValueNode
StandardException
java.lang.String getPrimitiveTypeName() throws StandardException
getPrimitiveTypeName
in class JavaValueNode
StandardException
- Thrown on errorJSQLType getJSQLType() throws StandardException
getJSQLType
in class JavaValueNode
StandardException
JavaValueNode bindExpression(FromList fromList, SubqueryList subqueryList, java.util.List<AggregateNode> aggregates) throws StandardException
bindExpression
in class JavaValueNode
fromList
- The FROM list for the query this
expression is in, for binding columns.subqueryList
- The subquery list being built as we find
SubqueryNodesaggregates
- The aggregate list being built as we find AggregateNodesStandardException
- 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>)
DataTypeDescriptor getDataType() throws StandardException
JavaValueNode
getDataType
in class JavaValueNode
StandardException
JavaValueNode remapColumnReferencesToExpressions() throws StandardException
remapColumnReferencesToExpressions
in class JavaValueNode
StandardException
- Thrown on errorValueNode.remapColumnReferencesToExpressions()
boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly) throws StandardException
categorize
in class JavaValueNode
referencedTabs
- JBitSet with bit map of referenced FromTablessimplePredsOnly
- Whether or not to consider method
calls, field references and conditional nodes
when building bit mapStandardException
- Thrown on errorValueNode.categorize(org.apache.derby.iapi.util.JBitSet, boolean)
void preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException
preprocess
in class JavaValueNode
numTables
- Number of tables in the DML StatementouterFromList
- FromList from outer query blockouterSubqueryList
- SubqueryList from outer query blockouterPredicateList
- PredicateList from outer query blockStandardException
- Thrown on errorValueNode.preprocess(int, org.apache.derby.impl.sql.compile.FromList, org.apache.derby.impl.sql.compile.SubqueryList, org.apache.derby.impl.sql.compile.PredicateList)
int getOrderableVariantType() throws StandardException
getOrderableVariantType
in class JavaValueNode
StandardException
- thrown on errorvoid generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
generateExpression
in class JavaValueNode
acb
- The ExpressionClassBuilder for the class being builtmb
- The method the expression will go intoStandardException
- Thrown on errorprivate void generateSQLValue(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
acb
- The ExpressionClassBuilder for the class being builtmb
- The method the expression will go intoStandardException
- Thrown on errorprivate void generateJavaValue(ExpressionClassBuilder acb, MethodBuilder mbex) throws StandardException
acb
- The ExpressionClassBuilder for the class being builtmbex
- The method the expression will go intoStandardException
- Thrown on errorprivate void generateReturnsNullOnNullCheck(MethodBuilder mb)
private java.lang.String getSQLValueInterfaceName() throws StandardException
StandardException
- Thrown on errorValueNode getSQLValueNode()
java.lang.Object getConstantValueAsObject() throws StandardException
getConstantValueAsObject
in class JavaValueNode
StandardException
- Thrown on errorValueNode.getConstantValueAsObject()
void acceptChildren(Visitor v) throws StandardException
acceptChildren
in class QueryTreeNode
v
- the visitorStandardException
- on errorApache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.