org.eigenbase.oj.stmt
Class PreparedExecution

java.lang.Object
  extended by org.eigenbase.oj.stmt.PreparedExecution
All Implemented Interfaces:
PreparedResult

public class PreparedExecution
extends Object
implements PreparedResult

PreparedExecution is a PreparedResult of a statement for which Java code was generated by preparation.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/oj/stmt/PreparedExecution.java#12 $
Author:
John V. Sichi

Field Summary
private  BoundMethod boundMethod
           
private  boolean isDml
           
private  ParseTree parseTree
           
private  RelNode rootRel
           
private  RelDataType rowType
           
private  TableModificationRelBase.Operation tableModOp
           
 
Constructor Summary
PreparedExecution(ParseTree parseTree, RelNode rootRel, RelDataType rowType, boolean isDml, TableModificationRelBase.Operation tableModOp, BoundMethod boundMethod)
           
 
Method Summary
 Object execute()
          Executes the prepared result.
 String getCode()
           
 Method getMethod()
           
 RelDataType getPhysicalRowType()
          Returns the physical row type of this prepared statement.
 RelNode getRootRel()
           
 TableModificationRelBase.Operation getTableModOp()
           
 boolean isDml()
           
 void setArgs(Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parseTree

private final ParseTree parseTree

rootRel

private final RelNode rootRel

rowType

private final RelDataType rowType

isDml

private final boolean isDml

tableModOp

private final TableModificationRelBase.Operation tableModOp

boundMethod

private final BoundMethod boundMethod
Constructor Detail

PreparedExecution

PreparedExecution(ParseTree parseTree,
                  RelNode rootRel,
                  RelDataType rowType,
                  boolean isDml,
                  TableModificationRelBase.Operation tableModOp,
                  BoundMethod boundMethod)
Method Detail

getCode

public String getCode()
Specified by:
getCode in interface PreparedResult
Returns:
the code generated by preparation

isDml

public boolean isDml()
Specified by:
isDml in interface PreparedResult
Returns:
true iff this result is for a DML statement, in which case the result set is one row with one column containing the number of rows affected.

getTableModOp

public TableModificationRelBase.Operation getTableModOp()
Specified by:
getTableModOp in interface PreparedResult
Returns:
the table modification operation corresponding to this statement if it is a table modification statement; otherwise null

getPhysicalRowType

public RelDataType getPhysicalRowType()
Returns the physical row type of this prepared statement. May not be identical to the row type returned by the validator; for example, the field names may have been made unique.


getMethod

public Method getMethod()

getRootRel

public RelNode getRootRel()

execute

public Object execute()
Description copied from interface: PreparedResult
Executes the prepared result.

Specified by:
execute in interface PreparedResult
Returns:
producer of rows resulting from execution

setArgs

public void setArgs(Object[] args)