|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FarragoSessionStmtContext
FarragoSessionStmtContext represents a context for executing SQL statements
within a particular FarragoSession
. Contrast with FarragoJdbcEngineStatement
(a JDBC wrapper),
FarragoSessionPreparingStmt
(which manages the preparation process
for a single statement), and FarragoSessionExecutableStmt
, (which is
shared by all sessions).
TODO: document statement lifecycle
Method Summary | |
---|---|
void |
addChildStmtContext(FarragoSessionStmtContext childStmtContext)
Adds a child statement context to the list of children context for a statement. |
void |
cancel()
Cancels execution. |
void |
clearParameters()
Clears any settings for all dynamic parameters. |
void |
closeResultSet()
Closes any result set associated with this statement context. |
void |
daemonize()
Turns this context into a daemon so that it will be deallocated as soon as its current result set is closed. |
void |
execute()
Executes the currently prepared statement. |
CancelFlag |
getCancelFlag()
Gets the cancellation flag for this context. |
FarragoSessionExecutingStmtInfo |
getExecutingStmtInfo()
Returns an object which contains information about this executing statement. |
RelDataType |
getPreparedParamType()
|
RelDataType |
getPreparedRowType()
|
int |
getQueryTimeout()
|
ResultSet |
getResultSet()
|
FarragoSession |
getSession()
|
String |
getSql()
|
long |
getStmtCurrentTime()
|
long |
getUpdateCount()
Obtains an update count produced by execute(), clearing this information as a side effect. |
FarragoWarningQueue |
getWarningQueue()
Gets the warning queue for this statement. |
boolean |
isPrepared()
|
boolean |
isPreparedDml()
|
void |
kill()
Cancels execution and destroys the statement. |
boolean |
needToSaveFirstTxnCsn()
|
void |
prepare(RelNode plan,
SqlKind kind,
boolean logical,
FarragoSessionPreparingStmt prep)
Prepares a query or DML statement (not DDL), provided as a query plan. |
void |
prepare(String sql,
boolean isExecDirect)
Prepares an SQL statement. |
void |
saveFirstTxnCsn(long csn)
Saves the commit sequence number associated with the first transaction initiated by a stmt associated with a root context. |
void |
setDynamicParam(int iParam,
Object arg)
Sets an input parameter. |
void |
setDynamicParam(int iParam,
Object arg,
Calendar cal)
Sets an input parameter. |
void |
setQueryTimeout(int milliseconds)
|
void |
setSaveFirstTxnCsn()
Indicates that the context needs to retrieve and save the commit sequence number for the very first transaction initiated by a stmt context associated with a root context. |
void |
unprepare()
Releases any resources (including result sets) associated with this statement context. |
Methods inherited from interface org.eigenbase.util.ClosableAllocation |
---|
closeAllocation |
Method Detail |
---|
FarragoSession getSession()
FarragoSessionExecutingStmtInfo getExecutingStmtInfo()
boolean isPrepared()
boolean isPreparedDml()
void daemonize()
void prepare(String sql, boolean isExecDirect)
sql
- text of statement to be preparedisExecDirect
- whether the statement is being prepared as part of
direct executionvoid prepare(RelNode plan, SqlKind kind, boolean logical, FarragoSessionPreparingStmt prep)
prepare(String,boolean)
, the statement can be executed by execute()
.
plan
- a query plan (ie a relational expression).kind
- SqlKind value that characterized the statement.logical
- true when the query plan is logical (needs to be
optimized), false when it is physical (already optimized).prep
- the FarragoSessionPreparingStatement that is managing the
query plan.RelDataType getPreparedRowType()
RelDataType getPreparedParamType()
void setDynamicParam(int iParam, Object arg)
iParam
- 0-based index of parameter to setarg
- value to setvoid setDynamicParam(int iParam, Object arg, Calendar cal)
iParam
- 0-based index of parameter to setarg
- value to setvoid clearParameters()
void execute()
ResultSet getResultSet()
long getUpdateCount()
void closeResultSet()
void cancel()
CancelFlag getCancelFlag()
cancel()
method instead.
void kill()
void unprepare()
FarragoWarningQueue getWarningQueue()
void setQueryTimeout(int milliseconds)
int getQueryTimeout()
String getSql()
long getStmtCurrentTime()
void setSaveFirstTxnCsn()
boolean needToSaveFirstTxnCsn()
void saveFirstTxnCsn(long csn)
csn
- the commit sequence numbervoid addChildStmtContext(FarragoSessionStmtContext childStmtContext)
childStmtContext
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |