saffron.rel
Class SubqueryFinder

java.lang.Object
  |
  +--openjava.ptree.util.ParseTreeVisitor
        |
        +--openjava.ptree.util.GenericVisitor
              |
              +--saffron.rel.SubqueryFinder

class SubqueryFinder
extends GenericVisitor


Field Summary
(package private)  QueryInfo queryInfo
           
 
Constructor Summary
(package private) SubqueryFinder(QueryInfo queryInfo)
           
 
Method Summary
 void visit(BinaryExpression p)
           
 void visit(UnaryExpression p)
          Replaces an exists expression.
 
Methods inherited from class openjava.ptree.util.GenericVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitGeneric
 
Methods inherited from class openjava.ptree.util.ParseTreeVisitor
visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queryInfo

QueryInfo queryInfo
Constructor Detail

SubqueryFinder

SubqueryFinder(QueryInfo queryInfo)
Method Detail

visit

public void visit(BinaryExpression p)
           throws ParseTreeException
Overrides:
visit in class GenericVisitor
ParseTreeException

visit

public void visit(UnaryExpression p)
           throws ParseTreeException
Replaces an exists expression. For example,
select from dept
 where dept.state.equals("CA") && exists (
	   select from emp where emp.deptno == dept.deptno)
becomes
select from dept left join (
		select distinct true from (
			select from emp where emp.deptno == dept.deptno)) as test
 where dept.state.equals("CA") && test

Overrides:
visit in class GenericVisitor
ParseTreeException

SourceForge.net_Logo