|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FarragoSession
FarragoSession represents an internal API to the Farrago database. It is designed to serve as a basis for the implementation of standard API's such as JDBC.
Method Summary | |
---|---|
FarragoSessionAnalyzedSql |
analyzeSql(String sql,
RelDataTypeFactory typeFactory,
RelDataType paramRowType,
boolean optimize)
Analyzes an SQL expression, and returns information about it. |
void |
cancel()
Cancels execution of any statements on this session (but does not kill it or them). |
FarragoSession |
cloneSession(FarragoSessionVariables inheritedVariables)
Clones this session. |
void |
commit()
Commits current transaction if any. |
void |
disableSubqueryReduction()
Disables subquery reduction for the current session. |
void |
endTransactionIfAuto(boolean commit)
Ends the current transaction if session is in autocommit mode. |
Collection<RefObject> |
executeLurqlQuery(String lurql,
Map<String,?> argMap)
Executes a LURQL query against the repository. |
FarragoSessionConnectionSource |
getConnectionSource()
|
DatabaseMetaData |
getDatabaseMetaData()
|
List<FarragoSessionModelExtension> |
getModelExtensions()
|
Pattern |
getOptRuleDescExclusionFilter()
|
FarragoSessionPersonality |
getPersonality()
|
FarragoPluginClassLoader |
getPluginClassLoader()
|
FarragoSessionPrivilegeMap |
getPrivilegeMap()
|
FarragoRepos |
getRepos()
|
FarragoSessionFactory |
getSessionFactory()
|
FarragoSessionIndexMap |
getSessionIndexMap()
|
FarragoSessionInfo |
getSessionInfo()
Returns a FarragoSessionInfo object which contains information on the runtime state of the session (e.g., active statements). |
Timestamp |
getSessionLabelCreationTimestamp()
Retrieves the creation timestamp for the session's label setting, if a label setting is set. |
Long |
getSessionLabelCsn()
Retrieves the commit sequence number associated with a session's label, if it's set. |
FarragoSessionVariables |
getSessionVariables()
|
FarragoSessionTxnId |
getTxnId(boolean createIfNeeded)
Gets the ID of the current transaction on this session, optionally initiating a new transaction if none is currently active. |
FarragoSessionTxnMgr |
getTxnMgr()
|
String |
getUrl()
|
FarragoWarningQueue |
getWarningQueue()
Gets the warning queue for this session. |
boolean |
isAutoCommit()
|
boolean |
isClone()
|
boolean |
isClosed()
|
boolean |
isLoopback()
Tests whether this session is a loopback session. |
boolean |
isReentrantAlterTableAddColumn()
Tests whether this is a reentrant session executing DML on behalf of ALTER TABLE ADD COLUMN. |
boolean |
isReentrantAlterTableRebuild()
Tests whether this is a reentrant session executing DML on behalf of ALTER TABLE REBUILD. |
boolean |
isTxnInProgress()
|
void |
kill()
Kills this session. |
FarragoSessionPrivilegeChecker |
newPrivilegeChecker()
Creates a new privilege checker for a session. |
FarragoSessionSavepoint |
newSavepoint(String name)
Creates a new savepoint based on the current session state. |
FarragoSessionStmtContext |
newStmtContext(FarragoSessionStmtParamDefFactory paramDefFactory)
Creates a new statement context within this session. |
FarragoSessionStmtContext |
newStmtContext(FarragoSessionStmtParamDefFactory paramDefFactory,
FarragoSessionStmtContext rootStmtContext)
Creates a new statement context within this session. |
FarragoSessionStmtValidator |
newStmtValidator()
Creates a new SQL statement validator. |
void |
releaseSavepoint(FarragoSessionSavepoint savepoint)
Releases an existing savepoint. |
void |
rollback(FarragoSessionSavepoint savepoint)
Rolls back current transaction if any. |
void |
setAutoCommit(boolean autoCommit)
Changes the autocommit mode for this session. |
void |
setConnectionSource(FarragoSessionConnectionSource source)
Initializes the connection source associated with this session. |
void |
setDatabaseMetaData(DatabaseMetaData dbMetaData)
Initializes the database metadata associated with this session. |
void |
setLoopback()
Flags this FarragoSession as being a loopback session. |
void |
setOptRuleDescExclusionFilter(Pattern exclusionFilter)
Sets the exclusion filter to use for planners created by this session. |
void |
setSessionIndexMap(FarragoSessionIndexMap sessionIndexMap)
Overrides the index map associated with this session |
boolean |
wasKilled()
|
Methods inherited from interface org.eigenbase.util.ClosableAllocation |
---|
closeAllocation |
Method Detail |
---|
FarragoSessionFactory getSessionFactory()
FarragoSessionPersonality getPersonality()
FarragoSessionStmtContext newStmtContext(FarragoSessionStmtParamDefFactory paramDefFactory)
paramDefFactory
- a factory for FarragoSessionStmtParamDef instances
FarragoSessionStmtContext newStmtContext(FarragoSessionStmtParamDefFactory paramDefFactory, FarragoSessionStmtContext rootStmtContext)
paramDefFactory
- a factory for FarragoSessionStmtParamDef instancesrootStmtContext
- the root statement context for an internally
prepared statement; for an externally prepared statement, this will be
null
FarragoSessionStmtValidator newStmtValidator()
FarragoSessionPrivilegeChecker newPrivilegeChecker()
Because privilege checkers are stateful, one privilege checker should be created for each statement.
FarragoSessionPrivilegeMap getPrivilegeMap()
FarragoSessionPrivilegeMap
for this sessionString getUrl()
FarragoRepos getRepos()
FarragoPluginClassLoader getPluginClassLoader()
List<FarragoSessionModelExtension> getModelExtensions()
FarragoSessionModelExtension
instancesboolean isClone()
boolean isClosed()
boolean wasKilled()
void kill()
ClosableAllocation.closeAllocation()
is called. After
this method is called, wasKilled()
and isClosed()
will
return true.
void cancel()
boolean isTxnInProgress()
FarragoSessionTxnId getTxnId(boolean createIfNeeded)
createIfNeeded
- if true and no transaction is active, create a new
one
FarragoSessionTxnMgr getTxnMgr()
boolean isAutoCommit()
FarragoSessionVariables getSessionVariables()
DatabaseMetaData getDatabaseMetaData()
FarragoSessionConnectionSource getConnectionSource()
FarragoSessionIndexMap getSessionIndexMap()
void setDatabaseMetaData(DatabaseMetaData dbMetaData)
dbMetaData
- metadata to setvoid setConnectionSource(FarragoSessionConnectionSource source)
source
- connection source to setvoid setSessionIndexMap(FarragoSessionIndexMap sessionIndexMap)
sessionIndexMap
- index map to setFarragoSession cloneSession(FarragoSessionVariables inheritedVariables)
inheritedVariables
- session variables to use for context in new
session, or null to inherit those of session being cloned
void setAutoCommit(boolean autoCommit)
autoCommit
- true to request autocommit; false to request manual
commitvoid commit()
void endTransactionIfAuto(boolean commit)
commit
- true to commit; false to rollbackvoid rollback(FarragoSessionSavepoint savepoint)
savepoint
- savepoint to roll back to, or null to rollback entire
transactionFarragoSessionSavepoint newSavepoint(String name)
name
- name to give new savepoint, or null for anonymous savepoint
void releaseSavepoint(FarragoSessionSavepoint savepoint)
savepoint
- savepoint to releaseFarragoSessionAnalyzedSql analyzeSql(String sql, RelDataTypeFactory typeFactory, RelDataType paramRowType, boolean optimize)
sql
- text of SQL expressiontypeFactory
- factory for creating result and param typesparamRowType
- if non-null, expression is expected to be a function
body with these parameters; if null, expression is expected to be a queryoptimize
- if true, run optimizer as part of analysis; otherwise,
skip optimization, returning less information
Collection<RefObject> executeLurqlQuery(String lurql, Map<String,?> argMap)
lurql
- query stringargMap
- from parameter name (String) to argument value (typically
String or Set)
FarragoSessionInfo getSessionInfo()
void setOptRuleDescExclusionFilter(Pattern exclusionFilter)
RelOptPlanner.setRuleDescExclusionFilter(java.util.regex.Pattern)
for details.
exclusionFilter
- pattern to match for exclusion; null to disable
filteringPattern getOptRuleDescExclusionFilter()
FarragoWarningQueue getWarningQueue()
void disableSubqueryReduction()
Long getSessionLabelCsn()
Timestamp getSessionLabelCreationTimestamp()
void setLoopback()
boolean isLoopback()
setLoopback()
boolean isReentrantAlterTableRebuild()
boolean isReentrantAlterTableAddColumn()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |