|
||||||||||
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.QueryTreeNodeVector
org.apache.derby.impl.sql.compile.ValueNodeList
A ValueNodeList represents a list of ValueNodes within a specific predicate (eg, IN list, NOT IN list or BETWEEN) in a DML statement. It extends QueryTreeNodeVector.
Field Summary |
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, beginOffset, endOffset |
Constructor Summary | |
ValueNodeList()
|
Method Summary | |
Visitable |
accept(Visitor v)
Accept a visitor, and call v.visit() on child nodes as necessary. |
void |
addElement(QueryTreeNode qt)
|
void |
addValueNode(ValueNode valueNode)
Add a ValueNode to the list. |
(package private) boolean |
allSamePrecendence(int precedence)
Return whether or not all of the entries in the list have the same type precendence as the specified value. |
void |
bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.Vector aggregateVector)
Bind this expression. |
boolean |
categorize(JBitSet referencedTabs,
boolean simplePredsOnly)
Categorize this predicate. |
void |
comparable(ValueNode leftOperand)
Determine whether or not the leftOperand is comparable() with all of the elements in the list. |
void |
compatible(ValueNode leftOperand)
Make sure that passed ValueNode's type is compatible with the non-parameter elements in the ValueNodeList. |
boolean |
constantExpression(PredicateList whereClause)
|
boolean |
containsAllConstantNodes()
Does this list contain all ConstantNodes? |
boolean |
containsAllParameterNodes()
Does this list contain all ParameterNodes? |
boolean |
containsParameterNode()
Does this list contain a ParameterNode? |
void |
destructiveAppend(QueryTreeNodeVector qtnv)
|
QueryTreeNode |
elementAt(int index)
|
void |
genSQLJavaSQLTrees()
Generate a SQL->Java->SQL conversion tree any node in the list which is not a system built-in type. |
DataTypeDescriptor |
getDominantTypeServices()
Get the dominant DataTypeServices from the elements in the list. |
protected int |
getOrderableVariantType()
Return the variant type for the underlying expression. |
DataTypeDescriptor |
getTypeServices()
Get the first non-null DataTypeServices from the elements in the list. |
(package private) int |
indexOf(QueryTreeNode qt)
|
(package private) void |
insertElementAt(QueryTreeNode qt,
int index)
|
boolean |
isConstantExpression()
Return whether or not this expression tree represents a constant expression. |
boolean |
isNullable()
Determine whether or not any of the elements in the list are nullable. |
void |
nondestructiveAppend(QueryTreeNodeVector qtnv)
|
void |
preprocess(int numTables,
FromList outerFromList,
SubqueryList outerSubqueryList,
PredicateList outerPredicateList)
Preprocess a ValueNodeList. |
void |
printSubNodes(int depth)
Prints the sub-nodes of this object. |
ValueNodeList |
remapColumnReferencesToExpressions()
Remap all ColumnReferences in this tree to be clones of the underlying expression. |
(package private) java.lang.Object |
remove(int index)
|
(package private) void |
removeAllElements()
|
(package private) void |
removeElement(QueryTreeNode qt)
|
(package private) void |
removeElementAt(int index)
|
void |
setClause(int clause)
Set the clause that this node appears in. |
(package private) void |
setElementAt(QueryTreeNode qt,
int index)
|
void |
setParameterDescriptor(DataTypeDescriptor descriptor)
Set the descriptor for every ParameterNode in the list. |
int |
size()
|
(package private) void |
sortInAscendingOrder(DataValueDescriptor judgeODV)
Sort the entries in the list in ascending order. |
java.lang.String |
toString()
Format this list as a string We can simply iterate through the list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ValueNodeList()
Method Detail |
public void printSubNodes(int depth)
printSubNodes
in class QueryTreeNode
depth
- The depth of this node in the tree
public void setClause(int clause)
clause
- The clause that this node appears in.
public void addValueNode(ValueNode valueNode) throws StandardException
valueNode
- A ValueNode to add to the list
StandardException
- Thrown on errorpublic void bindExpression(FromList fromList, SubqueryList subqueryList, java.util.Vector aggregateVector) throws StandardException
fromList
- 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 errorpublic void genSQLJavaSQLTrees() throws StandardException
StandardException
- Thrown on errorpublic DataTypeDescriptor getDominantTypeServices() throws StandardException
StandardException
- Thrown on errorpublic DataTypeDescriptor getTypeServices() throws StandardException
StandardException
- Thrown on errorboolean allSamePrecendence(int precedence)
precedence
- The specified precedence.
public void compatible(ValueNode leftOperand) throws StandardException
leftOperand
- Check for compatibility against this parameter's type
StandardException
public void comparable(ValueNode leftOperand) throws StandardException
leftOperand
- The left side of the expression
StandardException
- Thrown on errorpublic boolean isNullable()
public boolean containsParameterNode()
public boolean containsAllParameterNodes()
public boolean containsAllConstantNodes()
void sortInAscendingOrder(DataValueDescriptor judgeODV) throws StandardException
judgeODV
- In case of type not exactly matching, the judging type.
StandardException
- Thrown on errorpublic void setParameterDescriptor(DataTypeDescriptor descriptor) throws StandardException
descriptor
- The DataTypeServices to set for the parameters
StandardException
- Thrown on errorpublic void preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException
numTables
- 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 errorpublic ValueNodeList remapColumnReferencesToExpressions() throws StandardException
StandardException
- Thrown on errorpublic boolean isConstantExpression()
public boolean constantExpression(PredicateList whereClause)
ValueNode.constantExpression(org.apache.derby.impl.sql.compile.PredicateList)
public boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly) throws StandardException
referencedTabs
- 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 errorprotected int getOrderableVariantType() throws StandardException
StandardException
- thrown on errorpublic final int size()
public QueryTreeNode elementAt(int index)
public final void addElement(QueryTreeNode qt)
final void removeElementAt(int index)
final void removeElement(QueryTreeNode qt)
final java.lang.Object remove(int index)
final int indexOf(QueryTreeNode qt)
final void setElementAt(QueryTreeNode qt, int index)
public void destructiveAppend(QueryTreeNodeVector qtnv)
public void nondestructiveAppend(QueryTreeNodeVector qtnv)
final void removeAllElements()
final void insertElementAt(QueryTreeNode qt, int index)
public java.lang.String toString()
toString
in class QueryTreeNode
public Visitable accept(Visitor v) throws StandardException
accept
in interface Visitable
accept
in class QueryTreeNode
v
- the visitor
StandardException
- on error
|
Built on Mon 2007-06-04 09:58:47+0400, from revision ??? | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |