|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.JavaValueNode
org.apache.derby.impl.sql.compile.SQLToJavaValueNode
public class SQLToJavaValueNode
This node type converts a value in the SQL domain to a value in the Java domain.
| Field Summary | |
|---|---|
(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
|
| Fields inherited from class org.apache.derby.impl.sql.compile.JavaValueNode |
|---|
forCallStatement, jsqlType |
| Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
|---|
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired |
| Constructor Summary | |
|---|---|
SQLToJavaValueNode()
|
|
| Method Summary | |
|---|---|
(package private) void |
acceptChildren(Visitor v)
Accept the visitor for all visitable children of this node. |
JavaValueNode |
bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.List aggregateVector)
Bind this expression. |
boolean |
categorize(JBitSet referencedTabs,
boolean simplePredsOnly)
Categorize this predicate. |
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()
|
DataTypeDescriptor |
getDataType()
Override behavior in superclass. |
java.lang.String |
getJavaTypeName()
Returns the name of the java class type that this node coerces to. |
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()
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 |
void |
init(java.lang.Object value)
Constructor for a SQLToJavaValueNode |
void |
preprocess(int numTables,
FromList outerFromList,
SubqueryList outerSubqueryList,
PredicateList outerPredicateList)
Preprocess an expression tree. |
void |
printSubNodes(int depth)
Prints the sub-nodes of this object. |
JavaValueNode |
remapColumnReferencesToExpressions()
Remap all ColumnReferences in this tree to be clones of the underlying expression. |
| Methods inherited from class org.apache.derby.impl.sql.compile.JavaValueNode |
|---|
castToPrimitive, checkReliability, generate, generateReceiver, generateReceiver, getCollationType, getReceiverExpression, isPrimitiveType, mapToTypeID, markForCallStatement, markReturnValueDiscarded, mustCastToPrimitive, returnValueDiscarded, returnValueToSQLDomain, setCollationType, setJavaTypeName, valueReturnedToSQLDomain |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
ValueNode value
LocalField returnsNullOnNullState
| Constructor Detail |
|---|
public SQLToJavaValueNode()
| Method Detail |
|---|
public void init(java.lang.Object value)
init in interface Nodeinit in class QueryTreeNodevalue - A ValueNode representing a SQL value to convert to
the Java domain.public void printSubNodes(int depth)
printSubNodes in class QueryTreeNodedepth - The depth of this node in the tree
public java.lang.String getJavaTypeName()
throws StandardException
getJavaTypeName in class JavaValueNodeStandardException
public java.lang.String getPrimitiveTypeName()
throws StandardException
getPrimitiveTypeName in class JavaValueNodeStandardException - Thrown on error
public JSQLType getJSQLType()
throws StandardException
getJSQLType in class JavaValueNodeStandardException
public JavaValueNode bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.List aggregateVector)
throws StandardException
bindExpression in class JavaValueNodefromList - The FROM list for the query this
expression is in, for binding columns.subqueryList - The subquery list being built as we find
SubqueryNodesaggregateVector - The aggregate vector being built as we find AggregateNodes
StandardException - Thrown on errorValueNode.bindExpression(org.apache.derby.impl.sql.compile.FromList, org.apache.derby.impl.sql.compile.SubqueryList, java.util.List)
public DataTypeDescriptor getDataType()
throws StandardException
getDataType in class JavaValueNodeStandardException
public JavaValueNode remapColumnReferencesToExpressions()
throws StandardException
remapColumnReferencesToExpressions in class JavaValueNodeStandardException - Thrown on errorValueNode.remapColumnReferencesToExpressions()
public boolean categorize(JBitSet referencedTabs,
boolean simplePredsOnly)
throws StandardException
categorize in class JavaValueNodereferencedTabs - JBitSet with bit map of referenced FromTablessimplePredsOnly - Whether or not to consider method
calls, field references and conditional nodes
when building bit map
StandardException - Thrown on errorValueNode.categorize(org.apache.derby.iapi.util.JBitSet, boolean)
public void preprocess(int numTables,
FromList outerFromList,
SubqueryList outerSubqueryList,
PredicateList outerPredicateList)
throws StandardException
preprocess in class JavaValueNodenumTables - Number of tables in the DML StatementouterFromList - FromList from outer query blockouterSubqueryList - SubqueryList from outer query blockouterPredicateList - PredicateList from outer query block
StandardException - 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)
protected int getOrderableVariantType()
throws StandardException
getOrderableVariantType in class JavaValueNodeStandardException - thrown on error
public void generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb)
throws StandardException
generateExpression in class JavaValueNodeacb - The ExpressionClassBuilder for the class being builtmb - The method the expression will go into
StandardException - Thrown on error
private void generateSQLValue(ExpressionClassBuilder acb,
MethodBuilder mb)
throws StandardException
acb - The ExpressionClassBuilder for the class being builtmb - The method the expression will go into
StandardException - Thrown on error
private void generateJavaValue(ExpressionClassBuilder acb,
MethodBuilder mbex)
throws StandardException
acb - The ExpressionClassBuilder for the class being builtmbex - The method the expression will go into
StandardException - 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 JavaValueNodeStandardException - Thrown on errorValueNode.getConstantValueAsObject()
void acceptChildren(Visitor v)
throws StandardException
acceptChildren in class QueryTreeNodev - the visitor
StandardException - on error
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||