cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject cvs commit: xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp OracleEsqlQuery.java
Date Wed, 29 Jan 2003 21:01:05 GMT
tcurdt      2003/01/29 13:01:04

  Modified:    src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp
                        OracleEsqlQuery.java
  Log:
  oracle limit fix sent by Hay Bruce
  
  Revision  Changes    Path
  1.5       +14 -6     xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp/OracleEsqlQuery.java
  
  Index: OracleEsqlQuery.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp/OracleEsqlQuery.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- OracleEsqlQuery.java	27 Dec 2002 15:19:02 -0000	1.4
  +++ OracleEsqlQuery.java	29 Jan 2003 21:01:04 -0000	1.5
  @@ -87,19 +87,27 @@
                   return (new StringBuffer("select * from (select a.*, rownum rnum from (")
                           .append(super.getQueryString())
                           .append(") a where rownum <= ")
  -                        .append(getSkipRows() + getMaxRows() + 1)
  -                        .append(") where rnum >= ")
  +                        .append(getSkipRows() + getMaxRows())
  +                        .append(") where rnum > ")
                           .append(getSkipRows())
  -                        .append(")")
                           .toString());
               }
               else {
  -                throw new SQLException("Skip without Max. Please add this functionality
to class OracleEsqlQuery");
  -            }
  +		return (new StringBuffer("select * from (select a.*, rownum rnum from (")
  +                        .append(super.getQueryString())
  +			.append(") a ")
  +                        .append(") where rnum > ")
  +                        .append(getSkipRows())
  +                        .toString());
  +	    }
           }
           else {
               if (getMaxRows() > -1) {
  -                throw new SQLException("Max without Skip. Please add this functionality
to class OracleEsqlQuery");
  +                return (new StringBuffer("select * from (select a.*, rownum from (")
  +                        .append(super.getQueryString())
  +			.append(") a where rownum <= ")
  +                        .append(getMaxRows())
  +                        .append(")").toString());
               }
               else {
                   return (super.getQueryString());
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message