|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.server.StatementImpl
mondrian.olap4j.MondrianOlap4jStatement
abstract class MondrianOlap4jStatement
Implementation of OlapStatement
for the Mondrian OLAP engine.
| Field Summary | |
|---|---|
protected boolean |
closeOnCompletion
Support for #closeOnCompletion() method. |
(package private) MondrianOlap4jConnection |
olap4jConnection
|
(package private) MondrianOlap4jCellSet |
openCellSet
Current cell set, or null if the statement is not executing anything. |
| Fields inherited from class mondrian.server.StatementImpl |
|---|
query, queryTimeout |
| Fields inherited from interface java.sql.Statement |
|---|
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO |
| Constructor Summary | |
|---|---|
MondrianOlap4jStatement(MondrianOlap4jConnection olap4jConnection)
|
|
| Method Summary | ||
|---|---|---|
void |
addBatch(String sql)
|
|
void |
addListener(CellSetListener.Granularity granularity,
CellSetListener cellSetListener)
|
|
void |
cancel()
Issues a cancel request on this statement. |
|
void |
clearBatch()
|
|
void |
clearWarnings()
|
|
void |
close()
Closes this statement. |
|
boolean |
execute(String sql)
|
|
boolean |
execute(String sql,
int autoGeneratedKeys)
|
|
boolean |
execute(String sql,
int[] columnIndexes)
|
|
boolean |
execute(String sql,
String[] columnNames)
|
|
int[] |
executeBatch()
|
|
CellSet |
executeOlapQuery(SelectNode selectNode)
|
|
CellSet |
executeOlapQuery(String mdx)
|
|
protected CellSet |
executeOlapQueryInternal(Query query,
MondrianOlap4jCellSetMetaData cellSetMetaData)
Executes a parsed query, closing any previously open cellset. |
|
ResultSet |
executeQuery(String mdx)
|
|
(package private) ResultSet |
executeQuery2(String mdx,
boolean advanced,
String tabFields,
int[] rowCountSlot)
|
|
int |
executeUpdate(String sql)
|
|
int |
executeUpdate(String sql,
int autoGeneratedKeys)
|
|
int |
executeUpdate(String sql,
int[] columnIndexes)
|
|
int |
executeUpdate(String sql,
String[] columnNames)
|
|
OlapConnection |
getConnection()
|
|
int |
getFetchDirection()
|
|
int |
getFetchSize()
|
|
ResultSet |
getGeneratedKeys()
|
|
int |
getMaxFieldSize()
|
|
int |
getMaxRows()
|
|
RolapConnection |
getMondrianConnection()
Returns this statement's connection. |
|
boolean |
getMoreResults()
|
|
boolean |
getMoreResults(int current)
|
|
int |
getQueryTimeout()
|
|
ResultSet |
getResultSet()
|
|
int |
getResultSetConcurrency()
|
|
int |
getResultSetHoldability()
|
|
int |
getResultSetType()
|
|
int |
getUpdateCount()
|
|
SQLWarning |
getWarnings()
|
|
boolean |
isClosed()
|
|
boolean |
isPoolable()
|
|
boolean |
isWrapperFor(Class<?> iface)
|
|
(package private) void |
onResultSetClose(ResultSet resultSet)
Called by each child result set (most likely a cell set) when it is closed. |
|
protected Pair<Query,MondrianOlap4jCellSetMetaData> |
parseQuery(String mdx)
|
|
void |
setCursorName(String name)
|
|
void |
setEscapeProcessing(boolean enable)
|
|
void |
setFetchDirection(int direction)
|
|
void |
setFetchSize(int rows)
|
|
void |
setMaxFieldSize(int max)
|
|
void |
setMaxRows(int max)
|
|
void |
setPoolable(boolean poolable)
|
|
void |
setQueryTimeout(int seconds)
|
|
void |
start(Execution execution)
Starts an execution. |
|
|
unwrap(Class<T> iface)
|
|
| Methods inherited from class mondrian.server.StatementImpl |
|---|
checkCancelOrTimeout, enableProfiling, end, getCurrentExecution, getId, getProfileHandler, getProperty, getQuery, getQueryTimeoutMillis, getSchema, getSchemaReader, setQuery, setQueryTimeoutMillis |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface mondrian.server.Statement |
|---|
checkCancelOrTimeout, enableProfiling, end, getCurrentExecution, getId, getProfileHandler, getProperty, getQuery, getQueryTimeoutMillis, getSchema, getSchemaReader, setQuery, setQueryTimeoutMillis |
| Field Detail |
|---|
final MondrianOlap4jConnection olap4jConnection
protected boolean closeOnCompletion
#closeOnCompletion() method.
MondrianOlap4jCellSet openCellSet
| Constructor Detail |
|---|
MondrianOlap4jStatement(MondrianOlap4jConnection olap4jConnection)
| Method Detail |
|---|
public ResultSet executeQuery(String mdx)
throws SQLException
SQLException
ResultSet executeQuery2(String mdx,
boolean advanced,
String tabFields,
int[] rowCountSlot)
throws SQLException
SQLException
public int executeUpdate(String sql)
throws SQLException
SQLExceptionpublic void close()
Statement
close in interface Statement
public int getMaxFieldSize()
throws SQLException
SQLException
public void setMaxFieldSize(int max)
throws SQLException
SQLException
public int getMaxRows()
throws SQLException
SQLException
public void setMaxRows(int max)
throws SQLException
SQLException
public void setEscapeProcessing(boolean enable)
throws SQLException
SQLException
public int getQueryTimeout()
throws SQLException
SQLException
public void setQueryTimeout(int seconds)
throws SQLException
SQLException
public void cancel()
throws SQLException
StatementOnce the thread running the statement detects the cancel request,
execution will throw an exception. See
BasicQueryTest.testCancel for an example of usage of this
method.
cancel in interface Statementcancel in class StatementImplSQLException - on error
public SQLWarning getWarnings()
throws SQLException
SQLException
public void clearWarnings()
throws SQLException
SQLException
public void setCursorName(String name)
throws SQLException
SQLException
public boolean execute(String sql)
throws SQLException
SQLException
public ResultSet getResultSet()
throws SQLException
SQLException
public int getUpdateCount()
throws SQLException
SQLException
public boolean getMoreResults()
throws SQLException
SQLException
public void setFetchDirection(int direction)
throws SQLException
SQLException
public int getFetchDirection()
throws SQLException
SQLException
public void setFetchSize(int rows)
throws SQLException
SQLException
public int getFetchSize()
throws SQLException
SQLException
public int getResultSetConcurrency()
throws SQLException
SQLException
public int getResultSetType()
throws SQLException
SQLException
public void addBatch(String sql)
throws SQLException
SQLException
public void clearBatch()
throws SQLException
SQLException
public int[] executeBatch()
throws SQLException
SQLExceptionpublic OlapConnection getConnection()
getConnection in interface OlapStatement
public boolean getMoreResults(int current)
throws SQLException
SQLException
public ResultSet getGeneratedKeys()
throws SQLException
SQLException
public int executeUpdate(String sql,
int autoGeneratedKeys)
throws SQLException
SQLException
public int executeUpdate(String sql,
int[] columnIndexes)
throws SQLException
SQLException
public int executeUpdate(String sql,
String[] columnNames)
throws SQLException
SQLException
public boolean execute(String sql,
int autoGeneratedKeys)
throws SQLException
SQLException
public boolean execute(String sql,
int[] columnIndexes)
throws SQLException
SQLException
public boolean execute(String sql,
String[] columnNames)
throws SQLException
SQLException
public int getResultSetHoldability()
throws SQLException
SQLException
public boolean isClosed()
throws SQLException
SQLException
public void setPoolable(boolean poolable)
throws SQLException
SQLException
public boolean isPoolable()
throws SQLException
SQLException
public <T> T unwrap(Class<T> iface)
throws SQLException
unwrap in interface Wrapperunwrap in interface OlapWrapperSQLException
public boolean isWrapperFor(Class<?> iface)
throws SQLException
isWrapperFor in interface WrapperisWrapperFor in interface OlapWrapperSQLException
public CellSet executeOlapQuery(String mdx)
throws OlapException
executeOlapQuery in interface OlapStatementOlapException
protected Pair<Query,MondrianOlap4jCellSetMetaData> parseQuery(String mdx)
throws OlapException
OlapException
protected CellSet executeOlapQueryInternal(Query query,
MondrianOlap4jCellSetMetaData cellSetMetaData)
throws OlapException
query - Parsed querycellSetMetaData - Cell set metadata
OlapException - if a database error occurspublic void start(Execution execution)
Statement
start in interface Statementstart in class StatementImplexecution - Execution context
public CellSet executeOlapQuery(SelectNode selectNode)
throws OlapException
executeOlapQuery in interface OlapStatementOlapException
public void addListener(CellSetListener.Granularity granularity,
CellSetListener cellSetListener)
throws OlapException
addListener in interface OlapStatementOlapExceptionpublic RolapConnection getMondrianConnection()
Statement
getMondrianConnection in interface Statementvoid onResultSetClose(ResultSet resultSet)
resultSet - Result set or cell set
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||