cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1486340 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src: main/java/org/apache/cayenne/access/jdbc/RowDescriptorBuilder.java test/java/org/apache/cayenne/query/SQLSelectTest.java
Date Sat, 25 May 2013 16:34:59 GMT
Author: aadamchik
Date: Sat May 25 16:34:59 2013
New Revision: 1486340

URL: http://svn.apache.org/r1486340
Log:
CAY-1828  SQLSelect - generics friendly selecting raw sql query

support for scalar values

(low level change - allow for unnamed resultset columns to be processed)

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/RowDescriptorBuilder.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/SQLSelectTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/RowDescriptorBuilder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/RowDescriptorBuilder.java?rev=1486340&r1=1486339&r2=1486340&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/RowDescriptorBuilder.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/RowDescriptorBuilder.java
Sat May 25 16:34:59 2013
@@ -116,10 +116,7 @@ public class RowDescriptorBuilder {
         int outputLen = 0;
         for (int i = 0; i < rsLen; i++) {
             String rowkey = resolveDataRowKeyFromResultSet(i + 1);
-            if (rowkey.length() == 0) {
-                // escape this ColumnDescriptor, cause column name is empty
-                continue;
-            }
+            
             // resolve column descriptor from 'columns' or create new
             rsColumns[outputLen] = getColumnDescriptor(rowkey, columns, i + 1);
             outputLen++;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/SQLSelectTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/SQLSelectTest.java?rev=1486340&r1=1486339&r2=1486340&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/SQLSelectTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/SQLSelectTest.java
Sat May 25 16:34:59 2013
@@ -207,8 +207,7 @@ public class SQLSelectTest extends Serve
 
         createArtistsDataSet();
 
-        int c = SQLSelect.scalarQuery(Integer.class, "SELECT COUNT(*) FROM ARTIST").bind("a",
"artist3")
-                .selectOne(context);
+        int c = SQLSelect.scalarQuery(Integer.class, "SELECT COUNT(*) FROM ARTIST").selectOne(context);
 
         assertEquals(20, c);
     }



Mime
View raw message