saffron.opt
Class Query

java.lang.Object
  |
  +--saffron.opt.Query

public class Query
extends Object

A Query represents a set of Rels which come from the same select statement.


Field Summary
(package private)  HashMap mapCorelToRel
          Maps name of correlating variable (e.g.
 HashMap mapDeferredToCorel
          Maps a from-list expression to the name of the correlating variable which references it.
private  int nextCorel
           
private  VolcanoPlanner planner
           
 
Constructor Summary
Query()
           
 
Method Summary
 Cluster createCluster(Environment env, Expression exp, TypeFactory typeFactory)
           
 String createCorel()
          Constructs a new name for a correlating variable.
 String createCorelUnresolved(Object deferredLookup)
          Creates a name for a correlating variable for which no Rel has been created yet.
 Rel lookupCorel(String name)
          Returns the relational expression which populates a correlating variable.
 void mapCorel(String name, Rel rel)
          Maps a correlating variable to a Rel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nextCorel

private int nextCorel

mapCorelToRel

final HashMap mapCorelToRel
Maps name of correlating variable (e.g. "$Corel3") to the Rel which implements it.


mapDeferredToCorel

public final HashMap mapDeferredToCorel
Maps a from-list expression to the name of the correlating variable which references it. This is for forward-references, caused when from items have correlating variables. We will later resolve to a Rel.


planner

private final VolcanoPlanner planner
Constructor Detail

Query

public Query()
Method Detail

createCorel

public String createCorel()
Constructs a new name for a correlating variable. It is unique within the whole query.


mapCorel

public void mapCorel(String name,
                     Rel rel)
Maps a correlating variable to a Rel.


createCorelUnresolved

public String createCorelUnresolved(Object deferredLookup)
Creates a name for a correlating variable for which no Rel has been created yet.

Parameters:
deferredLookup - contains the information required to resolve the variable later

lookupCorel

public Rel lookupCorel(String name)
Returns the relational expression which populates a correlating variable.


createCluster

public Cluster createCluster(Environment env,
                             Expression exp,
                             TypeFactory typeFactory)

SourceForge.net_Logo