abstract class MondrianOlap4jStatement extends StatementImpl implements OlapStatement, Statement
OlapStatement
for the Mondrian OLAP engine.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closeOnCompletion
Support for
Statement.closeOnCompletion() method. |
(package private) MondrianOlap4jConnection |
olap4jConnection |
(package private) MondrianOlap4jCellSet |
openCellSet
Current cell set, or null if the statement is not executing anything.
|
query, queryTimeoutCLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO| Constructor and Description |
|---|
MondrianOlap4jStatement(MondrianOlap4jConnection olap4jConnection) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
<T> T |
unwrap(Class<T> iface) |
checkCancelOrTimeout, enableProfiling, end, getCurrentExecution, getId, getProfileHandler, getProperty, getQuery, getQueryTimeoutMillis, getSchema, getSchemaReader, setQuery, setQueryTimeoutMillisclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseOnCompletion, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isCloseOnCompletion, setLargeMaxRowscheckCancelOrTimeout, enableProfiling, end, getCurrentExecution, getId, getProfileHandler, getProperty, getQuery, getQueryTimeoutMillis, getSchema, getSchemaReader, setQuery, setQueryTimeoutMillisfinal MondrianOlap4jConnection olap4jConnection
protected boolean closeOnCompletion
Statement.closeOnCompletion() method.MondrianOlap4jCellSet openCellSet
MondrianOlap4jStatement(MondrianOlap4jConnection olap4jConnection)
public ResultSet executeQuery(String mdx) throws SQLException
SQLExceptionResultSet executeQuery2(String mdx, boolean advanced, String tabFields, int[] rowCountSlot) throws SQLException
SQLExceptionpublic int executeUpdate(String sql) throws SQLException
SQLExceptionpublic void close()
Statementclose in interface AutoCloseableclose in interface Statementpublic int getMaxFieldSize()
throws SQLException
SQLExceptionpublic void setMaxFieldSize(int max)
throws SQLException
SQLExceptionpublic int getMaxRows()
throws SQLException
SQLExceptionpublic void setMaxRows(int max)
throws SQLException
SQLExceptionpublic void setEscapeProcessing(boolean enable)
throws SQLException
SQLExceptionpublic int getQueryTimeout()
throws SQLException
SQLExceptionpublic void setQueryTimeout(int seconds)
throws SQLException
SQLExceptionpublic 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 errorpublic SQLWarning getWarnings() throws SQLException
SQLExceptionpublic void clearWarnings()
throws SQLException
SQLExceptionpublic void setCursorName(String name) throws SQLException
SQLExceptionpublic boolean execute(String sql) throws SQLException
SQLExceptionpublic ResultSet getResultSet() throws SQLException
SQLExceptionpublic int getUpdateCount()
throws SQLException
SQLExceptionpublic boolean getMoreResults()
throws SQLException
SQLExceptionpublic void setFetchDirection(int direction)
throws SQLException
SQLExceptionpublic int getFetchDirection()
throws SQLException
SQLExceptionpublic void setFetchSize(int rows)
throws SQLException
SQLExceptionpublic int getFetchSize()
throws SQLException
SQLExceptionpublic int getResultSetConcurrency()
throws SQLException
SQLExceptionpublic int getResultSetType()
throws SQLException
SQLExceptionpublic void addBatch(String sql) throws SQLException
SQLExceptionpublic void clearBatch()
throws SQLException
SQLExceptionpublic int[] executeBatch()
throws SQLException
SQLExceptionpublic OlapConnection getConnection()
getConnection in interface OlapStatementpublic boolean getMoreResults(int current)
throws SQLException
SQLExceptionpublic ResultSet getGeneratedKeys() throws SQLException
SQLExceptionpublic int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
SQLExceptionpublic int executeUpdate(String sql, int[] columnIndexes) throws SQLException
SQLExceptionpublic int executeUpdate(String sql, String[] columnNames) throws SQLException
SQLExceptionpublic boolean execute(String sql, int autoGeneratedKeys) throws SQLException
SQLExceptionpublic boolean execute(String sql, int[] columnIndexes) throws SQLException
SQLExceptionpublic boolean execute(String sql, String[] columnNames) throws SQLException
SQLExceptionpublic int getResultSetHoldability()
throws SQLException
SQLExceptionpublic boolean isClosed()
throws SQLException
SQLExceptionpublic void setPoolable(boolean poolable)
throws SQLException
SQLExceptionpublic boolean isPoolable()
throws SQLException
SQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface Wrapperunwrap in interface OlapWrapperSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperisWrapperFor in interface OlapWrapperSQLExceptionpublic CellSet executeOlapQuery(String mdx) throws OlapException
executeOlapQuery in interface OlapStatementOlapExceptionprotected Pair<Query,MondrianOlap4jCellSetMetaData> parseQuery(String mdx) throws OlapException
OlapExceptionprotected CellSet executeOlapQueryInternal(Query query, MondrianOlap4jCellSetMetaData cellSetMetaData) throws OlapException
query - Parsed querycellSetMetaData - Cell set metadataOlapException - if a database error occurspublic void start(Execution execution)
Statementstart in interface Statementstart in class StatementImplexecution - Execution contextpublic CellSet executeOlapQuery(SelectNode selectNode) throws OlapException
executeOlapQuery in interface OlapStatementOlapExceptionpublic void addListener(CellSetListener.Granularity granularity, CellSetListener cellSetListener) throws OlapException
addListener in interface OlapStatementOlapExceptionpublic RolapConnection getMondrianConnection()
StatementgetMondrianConnection in interface Statementvoid onResultSetClose(ResultSet resultSet)
resultSet - Result set or cell set