|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.components.language.markup.xsp.AbstractEsqlQuery org.apache.cocoon.components.language.markup.xsp.SybaseEsqlQuery
public final class SybaseEsqlQuery
Database specific EsqlQuery
Constructor Summary | |
---|---|
SybaseEsqlQuery(Connection connection,
String query)
|
Method Summary | |
---|---|
String |
getQueryString()
Return the query string ("select * from bla") NOTE: Might want to be overridden by indiviual EsqlQuery implementations e.g. for database specific LIMIT features. |
void |
getResultRows()
Move to the first row. |
AbstractEsqlQuery |
newInstance(ResultSet resultSet)
Create a EsqlQuery of the same type |
CallableStatement |
prepareCall()
NOTE: Might want to be overridden by indiviual EsqlQuery implementations |
PreparedStatement |
prepareStatement()
NOTE: Might want to be overridden by indiviual EsqlQuery implementations |
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, setGroupingVar, setKeepGoing, setMaxRows, setPosition, setPreparedStatement, setSkipRows |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SybaseEsqlQuery(Connection connection, String query)
Method Detail |
---|
public AbstractEsqlQuery newInstance(ResultSet resultSet)
newInstance
in class AbstractEsqlQuery
resultSet
- public String getQueryString() throws SQLException
AbstractEsqlQuery
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
getQueryString
in class AbstractEsqlQuery
SQLException
public PreparedStatement prepareStatement() throws SQLException
AbstractEsqlQuery
prepareStatement
in class AbstractEsqlQuery
SQLException
public CallableStatement prepareCall() throws SQLException
AbstractEsqlQuery
prepareCall
in class AbstractEsqlQuery
SQLException
public void getResultRows() throws SQLException
AbstractEsqlQuery
getResultRows
in class AbstractEsqlQuery
SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |