[hg] main-silver: #231030: DataView pagination broken if scrolla...

  • From: Jaroslav Havlin < >
  • To:
  • Subject: [hg] main-silver: #231030: DataView pagination broken if scrolla...
  • Date: Fri, 21 Jun 2013 04:46:57 -0700

changeset 4db74340500c in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/4db74340500c
description:
        #231030: DataView pagination broken if scrollable cursors are disabled

diffstat:

 
db.dataview/src/org/netbeans/modules/db/dataview/output/SQLExecutionHelper.java
 |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (19 lines):

diff --git 
a/db.dataview/src/org/netbeans/modules/db/dataview/output/SQLExecutionHelper.java
 
b/db.dataview/src/org/netbeans/modules/db/dataview/output/SQLExecutionHelper.java
--- 
a/db.dataview/src/org/netbeans/modules/db/dataview/output/SQLExecutionHelper.java
+++ 
b/db.dataview/src/org/netbeans/modules/db/dataview/output/SQLExecutionHelper.java
@@ -722,7 +722,14 @@
         }
 
         int pageSize = pageContext.getPageSize();
-        int startFrom = pageContext.getCurrentPos();
+        int startFrom;
+        if (useScrollableCursors ) {
+            startFrom = pageContext.getCurrentPos(); // will use rs.absolute
+        } else if (!limitSupported || 
isLimitUsedInSelect(dataView.getSQLString())) {
+            startFrom = pageContext.getCurrentPos(); // need to use slow skip
+        } else {
+            startFrom = 0; // limit added to select, can start from first 
item
+        }
 
         final List<Object[]> rows = new ArrayList<Object[]>();
         int colCnt = pageContext.getTableMetaData().getColumnCount();

[hg] main-silver: #231030: DataView pagination broken if scrolla...

Jaroslav Havlin 06/21/2013

Project Features

About this Project

DB was started in November 2009, is owned by Antonin Nebuzelsky, and has 113 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close