r9563 - helma/helma/trunk/src/helma/objectmodel/db

[email protected]
Newsgroups gmane.comp.java.helma.cvs
Message-ID <20090401160330.00F473D0D6@mia>
Author: hannes
Date: 2009-04-01 18:03:30 +0200 (Wed, 01 Apr 2009)
New Revision: 9563

Modified:
   helma/helma/trunk/src/helma/objectmodel/db/Relation.java
Log:
Simplify code a little bit.

Details at http://dev.helma.org/trac/helma/changeset/9563

Modified: helma/helma/trunk/src/helma/objectmodel/db/Relation.java
===================================================================
--- helma/helma/trunk/src/helma/objectmodel/db/Relation.java	2009-04-01 15:49:59 UTC (rev 9562)
+++ helma/helma/trunk/src/helma/objectmodel/db/Relation.java	2009-04-01 16:03:30 UTC (rev 9563)
@@ -921,11 +921,10 @@
         if (maxSize > 0) {
             if (otherType.isOracle()) {
                 // see http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html
-                int minRow = offset;
-                int maxRow = minRow + maxSize;
-                if (minRow > 0) {
+                int maxRow = offset + maxSize;
+                if (offset > 0) {
                     q.insert(0, "SELECT * FROM ( SELECT /*+ FIRST_ROWS(n) */ a.*, ROWNUM rnum FROM (");
-                    q.append(") a WHERE ROWNUM <= ").append(maxRow).append(") WHERE rnum > ").append(minRow);
+                    q.append(") a WHERE ROWNUM <= ").append(maxRow).append(") WHERE rnum > ").append(offset);
                 } else {
                     q.insert(0, "SELECT /*+ FIRST_ROWS(n) */ * FROM (");
                     q.append(") WHERE ROWNUM <= ").append(maxRow);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.