org.apache.cocoon.components.language.markup.xsp
Class OracleEsqlQuery
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.components.language.markup.xsp.AbstractEsqlQuery
org.apache.cocoon.components.language.markup.xsp.OracleEsqlQuery
- All Implemented Interfaces:
- LogEnabled
public final class OracleEsqlQuery
- extends AbstractEsqlQuery
- Version:
- CVS $Id: OracleEsqlQuery.html 1304258 2012-03-23 10:09:27Z ilgrosso $
- Author:
- Torsten Curdt
Methods inherited from class org.apache.cocoon.components.language.markup.xsp.AbstractEsqlQuery |
cleanUp, decGroupLevel, execute, execute, executeQuery, getCallableStatement, getConnection, getCurrentRow, getMaxRows, getMoreResults, getPreparedStatement, getQueryResultsCount, getResultSet, getResultSetMetaData, getRowCount, getSkipRows, getUpdateCount, getUpdateResultsCount, groupLevelExists, hasGroupingVarChanged, hasResultSet, incGroupLevel, keepGoing, nextRow, prepareCall, prepareStatement, setGroupingVar, setKeepGoing, setMaxRows, setPosition, setPreparedStatement, setSkipRows |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OracleEsqlQuery
public OracleEsqlQuery(Connection connection,
String query)
newInstance
public AbstractEsqlQuery newInstance(ResultSet resultSet)
- Create a EsqlQuery of the same type
- Specified by:
newInstance
in class AbstractEsqlQuery
- Parameters:
resultSet
-
getQueryString
public String getQueryString()
throws SQLException
- Description copied from class:
AbstractEsqlQuery
- Return the query string ("select * from bla")
NOTE: Might want to be overridden by indiviual EsqlQuery implementations
e.g. for database specific LIMIT features. Be aware that there a two different
limit approaches:
retrieve query
time time
+---------+ ...........
|JDBC | : :
|ResultSet| : :
|.........|-+ :_________:_
| | | skip/max+1 |JDBC | | skip/max+1
| | | window |ResultSet| | window
|.........| | |_________| |
| |-+ : :_|
| | : :
+---------+ :.........:
With the "retrieve time" limit the JDBC ResultSet includes ALL of the rows of the
query.
With the "query time" limit only a small window of rows are in the actuall JDBC
ResultSet. In order to know whether there are more rows available (without an additional
query) we need to have at least one more row in the JDBC ResultSet. So we ask for getMaxRows()+1
- Overrides:
getQueryString
in class AbstractEsqlQuery
- Throws:
SQLException
getResultRows
public void getResultRows()
throws SQLException
- Description copied from class:
AbstractEsqlQuery
- Move to the first row.
NOTE: Might want to be overridden by indiviual EsqlQuery implementations
- Overrides:
getResultRows
in class AbstractEsqlQuery
- Throws:
SQLException
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.