|
|||||||||
| Home >> All >> org >> apache >> derby >> impl >> sql >> [ compile overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.impl.sql.compile
Class SubqueryList

java.lang.Objectorg.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.QueryTreeNodeVector
org.apache.derby.impl.sql.compile.SubqueryList
- All Implemented Interfaces:
- org.apache.derby.iapi.sql.compile.Visitable
- public class SubqueryList
- extends QueryTreeNodeVector
A SubqueryList represents a list of subquerys within a specific clause (select, where or having) 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 | |
SubqueryList()
|
|
| Method Summary | |
org.apache.derby.iapi.sql.compile.Visitable |
accept(org.apache.derby.iapi.sql.compile.Visitor v)
Accept a visitor, and call v.visit() on child nodes as necessary. |
void |
addElement(QueryTreeNode qt)
|
void |
addSubqueryNode(SubqueryNode subqueryNode)
Add a subquery to the list. |
(package private) void |
decrementLevel(int decrement)
Decrement (query block) level (0-based) for all of the tables in this subquery list. |
void |
destructiveAppend(QueryTreeNodeVector qtnv)
|
QueryTreeNode |
elementAt(int index)
|
(package private) int |
indexOf(QueryTreeNode qt)
|
(package private) void |
insertElementAt(QueryTreeNode qt,
int index)
|
void |
modifyAccessPaths()
Modify the access paths for all subqueries in this list. |
void |
nondestructiveAppend(QueryTreeNodeVector qtnv)
|
void |
optimize(org.apache.derby.iapi.sql.dictionary.DataDictionary dataDictionary,
double outerRows)
Optimize the subqueries in this list. |
void |
preprocess(int numTables,
FromList outerFromList,
SubqueryList outerSubqueryList,
PredicateList outerPredicateList)
Preprocess a SubqueryList. |
void |
printSubNodes(int depth)
Prints the sub-nodes of this object. |
boolean |
referencesSessionSchema()
Return true if the node references SESSION schema tables (temporary or permanent) |
boolean |
referencesTarget(java.lang.String name,
boolean baseTable)
Search to see if a query references the specifed table name. |
(package private) java.lang.Object |
remove(int index)
|
(package private) void |
removeAllElements()
|
(package private) void |
removeElement(QueryTreeNode qt)
|
(package private) void |
removeElementAt(int index)
|
(package private) void |
setElementAt(QueryTreeNode qt,
int index)
|
void |
setPointOfAttachment(int pointOfAttachment)
Set the point of attachment in all subqueries in this list. |
int |
size()
|
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 |
SubqueryList
public SubqueryList()
| Method Detail |
printSubNodes
public void printSubNodes(int depth)
- Prints the sub-nodes of this object. See QueryTreeNode.java for
how tree printing is supposed to work.
- Overrides:
printSubNodesin classQueryTreeNode
addSubqueryNode
public void addSubqueryNode(SubqueryNode subqueryNode) throws org.apache.derby.iapi.error.StandardException
- Add a subquery to the list.
preprocess
public void preprocess(int numTables,
FromList outerFromList,
SubqueryList outerSubqueryList,
PredicateList outerPredicateList)
throws org.apache.derby.iapi.error.StandardException
- Preprocess a SubqueryList. For now, we just preprocess each SubqueryNode
in the list.
optimize
public void optimize(org.apache.derby.iapi.sql.dictionary.DataDictionary dataDictionary, double outerRows) throws org.apache.derby.iapi.error.StandardException
- Optimize the subqueries in this list.
modifyAccessPaths
public void modifyAccessPaths()
throws org.apache.derby.iapi.error.StandardException
- Modify the access paths for all subqueries in this list.
referencesTarget
public boolean referencesTarget(java.lang.String name, boolean baseTable) throws org.apache.derby.iapi.error.StandardException
- Search to see if a query references the specifed table name.
referencesSessionSchema
public boolean referencesSessionSchema()
throws org.apache.derby.iapi.error.StandardException
- Return true if the node references SESSION schema tables (temporary or permanent)
- Overrides:
referencesSessionSchemain classQueryTreeNode
setPointOfAttachment
public void setPointOfAttachment(int pointOfAttachment)
throws org.apache.derby.iapi.error.StandardException
- Set the point of attachment in all subqueries in this list.
decrementLevel
void decrementLevel(int decrement)
- Decrement (query block) level (0-based) for
all of the tables in this subquery list.
This is useful when flattening a subquery.
size
public final int size()
elementAt
public QueryTreeNode elementAt(int index)
addElement
public final void addElement(QueryTreeNode qt)
removeElementAt
final void removeElementAt(int index)
removeElement
final void removeElement(QueryTreeNode qt)
remove
final java.lang.Object remove(int index)
indexOf
final int indexOf(QueryTreeNode qt)
setElementAt
final void setElementAt(QueryTreeNode qt, int index)
destructiveAppend
public void destructiveAppend(QueryTreeNodeVector qtnv)
nondestructiveAppend
public void nondestructiveAppend(QueryTreeNodeVector qtnv)
removeAllElements
final void removeAllElements()
insertElementAt
final void insertElementAt(QueryTreeNode qt, int index)
toString
public java.lang.String toString()
- Format this list as a string
We can simply iterate through the list. Note each list member
is a QueryTreeNode, and so should have its specialization of
toString defined.
- Overrides:
toStringin classQueryTreeNode
accept
public org.apache.derby.iapi.sql.compile.Visitable accept(org.apache.derby.iapi.sql.compile.Visitor v) throws org.apache.derby.iapi.error.StandardException
- Accept a visitor, and call v.visit()
on child nodes as necessary.
- Specified by:
acceptin interfaceorg.apache.derby.iapi.sql.compile.Visitable- Overrides:
acceptin classQueryTreeNode
|
|||||||||
| Home >> All >> org >> apache >> derby >> impl >> sql >> [ compile overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC