db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r598731 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScanResultSet.java
Date Tue, 27 Nov 2007 18:59:06 GMT
Author: djd
Date: Tue Nov 27 10:59:05 2007
New Revision: 598731

URL: http://svn.apache.org/viewvc?rev=598731&view=rev
Log:
Add some comments to ScanResultSet to indicate some of its expected behaviour

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScanResultSet.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScanResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScanResultSet.java?rev=598731&r1=598730&r2=598731&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScanResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScanResultSet.java Tue
Nov 27 10:59:05 2007
@@ -30,7 +30,29 @@
 
 /**
  * Abstract <code>ResultSet</code> class for <code>NoPutResultSet</code>s
which
- * contain a scan.
+ * contain a scan. Returns rows that may be a column sub-set of the
+ * rows in the underlying object to be scanned. If accessedCols is
+ * not null then a sub-set of columns will be fetched from the underlying
+ * object (usually into the candidate row object), then the returned
+ * rows will be a compacted form of that row, with the not-fetched columns
+ * moved out. If accessedCols is null then the full row will be returned.
+ * <BR>
+ * Example: if accessedCols indicates that we want to retrieve columns
+ * 1 and 4, then candidate row will have space for 5
+ * columns (because that's the size of the rows in the underlying object),
+ * but only cols "1" and "4" will have values:
+ * <BR>
+ * <pre>
+ *     0    1    2    3    4
+ *  [  - , COL1,  - ,  - , COL4 ]
+ *  </pre>
+ *  <BR>
+ * Rows returned by this ScanResultSet will have the values:
+ * <BR>
+ * <pre>
+ *     0     1
+ *  [ COL1, COL4 ]
+ * </pre>
  */
 abstract class ScanResultSet extends NoPutResultSetImpl {
 
@@ -49,7 +71,9 @@
     /** The scan isolation level. */
     int isolationLevel;
 
-    /** The candidate row. */
+    /** The candidate row, matches the shape of the rows in
+     * the underlying object to be scanned.
+     */
     final ExecRow candidate;
     
     /**
@@ -68,6 +92,8 @@
      * @param lockMode lock mode (record or table)
      * @param tableLocked true if marked as table locked in SYS.SYSTABLES
      * @param isolationLevel language isolation level for the result set
+     * @param colRefItem Identifier of saved object for accessedCols,
+     * -1 if need to fetch all columns.
      * @param optimizerEstimatedRowCount estimated row count
      * @param optimizerEstimatedCost estimated cost
      */



Mime
View raw message