net.sf.farrago.session
Interface FarragoSessionExecutableStmt

All Superinterfaces:
ClosableAllocation, ClosableAllocationOwner, FarragoAllocation, FarragoAllocationOwner
All Known Implementing Classes:
FarragoExecutableExplainStmt, FarragoExecutableFennelStmt, FarragoExecutableJavaStmt, FarragoExecutableStmtImpl

public interface FarragoSessionExecutableStmt
extends FarragoAllocationOwner

FarragoSessionExecutableStmt represents the executable output of FarragoPreparingStmt processing. Instances must be reentrant, so that multiple threads can be executed simultaneously (each with a private FarragoSessionRuntimeContext).

NOTE: FarragoSessionExecutableStmt implementations must be kept as lean as possible for optimal caching (we want memory usage to be minimum, and usage estimation to be as accurate as possible). In particular, they must have no references to information needed only during preparation; all of that should be made available to the garbage collector.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/session/FarragoSessionExecutableStmt.java#17 $
Author:
John V. Sichi

Method Summary
 ResultSet execute(FarragoSessionRuntimeContext runtimeContext)
          Executes this statement.
 RelDataType getDynamicParamRowType()
           
 Map<String,RelDataType> getIterCalcTypeMap()
          Map from IterCalcRel tag to row type.
 long getMemoryUsage()
           
 Set<String> getReferencedObjectIds()
           
 String getReferencedObjectModTime(String mofid)
           
 Map<String,RelDataType> getResultSetTypeMap()
          Map from result set name to row type.
 RelDataType getRowType()
           
 TableAccessMap getTableAccessMap()
           
 TableModificationRelBase.Operation getTableModOp()
           
 boolean isDml()
           
 
Methods inherited from interface org.eigenbase.util.ClosableAllocationOwner
addAllocation
 
Methods inherited from interface org.eigenbase.util.ClosableAllocation
closeAllocation
 
Methods inherited from interface org.eigenbase.util.ClosableAllocation
closeAllocation
 

Method Detail

execute

ResultSet execute(FarragoSessionRuntimeContext runtimeContext)
Executes this statement.

Parameters:
runtimeContext - context in which to execute
Returns:
ResultSet produced by statement

getRowType

RelDataType getRowType()
Returns:
type descriptor for rows produced by this stmt

getDynamicParamRowType

RelDataType getDynamicParamRowType()
Returns:
type descriptor for row of dynamic parameters expected by this stmt

isDml

boolean isDml()
Returns:
true if this statement is DML; false if a query

getTableModOp

TableModificationRelBase.Operation getTableModOp()
Returns:
the table modification operation type if this is a table modification statement; otherwise null

getMemoryUsage

long getMemoryUsage()
Returns:
approximate total number of bytes used by this statement's in-memory representation

getReferencedObjectIds

Set<String> getReferencedObjectIds()
Returns:
Set of MOFID's of objects accessed when this stmt is executed

getReferencedObjectModTime

String getReferencedObjectModTime(String mofid)
Returns:
the modification time of an object accessed by this statement, or null if the modification time is not available

getTableAccessMap

TableAccessMap getTableAccessMap()
Returns:
map of access modes for all tables referenced

getResultSetTypeMap

Map<String,RelDataType> getResultSetTypeMap()
Map from result set name to row type.


getIterCalcTypeMap

Map<String,RelDataType> getIterCalcTypeMap()
Map from IterCalcRel tag to row type.