db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henn...@apache.org
Subject cvs commit: db-torque/xdocs changes.xml
Date Wed, 01 Dec 2004 15:49:35 GMT
henning     2004/12/01 07:49:35

  Modified:    .        Tag: TORQUE_3_1_BRANCH project-base.xml
               src/java/org/apache/torque/util Tag: TORQUE_3_1_BRANCH
                        SQLBuilder.java
               xdocs    Tag: TORQUE_3_1_BRANCH changes.xml
  Log:
  Applied TRQS250 (aliases columns in GROUP BY) suggested by Tarlika
  Elisabeth Schmitz. This would probably make sense for ORDER BY
  columns, too.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.9.2.14  +4 -0      db-torque/project-base.xml
  
  Index: project-base.xml
  ===================================================================
  RCS file: /home/cvs/db-torque/project-base.xml,v
  retrieving revision 1.9.2.13
  retrieving revision 1.9.2.14
  diff -u -r1.9.2.13 -r1.9.2.14
  --- project-base.xml	1 Dec 2004 15:07:48 -0000	1.9.2.13
  +++ project-base.xml	1 Dec 2004 15:49:34 -0000	1.9.2.14
  @@ -253,6 +253,10 @@
         <email>drfish@cox.net</email>
       </contributor>
       <contributor>
  +      <name>Tarlika Elisabeth Schmitz</name>
  +      <email>tes@numerixtechnology.de</email>
  +    </contributor>
  +    <contributor>
         <name>Thomas Vandahl</name>
         <email>thomas@vandahl.org</email>
       </contributor>
  
  
  
  No                   revision
  No                   revision
  1.1.2.3   +15 -5     db-torque/src/java/org/apache/torque/util/Attic/SQLBuilder.java
  
  Index: SQLBuilder.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/java/org/apache/torque/util/Attic/SQLBuilder.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- SQLBuilder.java	1 Dec 2004 15:03:39 -0000	1.1.2.2
  +++ SQLBuilder.java	1 Dec 2004 15:49:34 -0000	1.1.2.3
  @@ -396,13 +396,23 @@
           {
               for (int i = 0; i < groupBy.size(); i++)
               {
  -                String groupByColumn = (String) groupBy.get(i);
  -                if (groupByColumn.indexOf('.') == -1)
  +                String columnName = (String) groupBy.get(i);
  +                String column = (String) crit.getAsColumns().get(columnName);
  +
  +                if (column == null)
  +                {
  +                    column = columnName;
  +                }
  +
  +                if (column.indexOf('.') != -1)
  +                {
  +                    groupByClause.add(column);
  +                }
  +                else
                   {
                       throwMalformedColumnNameException("group by",
  -                            groupByColumn);
  +                            column);
                   }
  -                groupByClause.add(groupByColumn);
               }
           }
       }
  
  
  
  No                   revision
  No                   revision
  1.140.2.22 +4 -0      db-torque/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/db-torque/xdocs/changes.xml,v
  retrieving revision 1.140.2.21
  retrieving revision 1.140.2.22
  diff -u -r1.140.2.21 -r1.140.2.22
  --- changes.xml	1 Dec 2004 15:03:39 -0000	1.140.2.21
  +++ changes.xml	1 Dec 2004 15:49:34 -0000	1.140.2.22
  @@ -26,6 +26,10 @@
   
     <body>
     <release version="3.1.2-dev" date="in CVS">
  +    <action type="add" dev="henning" issue="TRQS250">
  +      Patch to allow aliases columns in groupBy clauses. Patch suggested by
  +      Tarlika Elisabeth Schmitz.
  +    </action>
       <action type="add" dev="henning" issue="TRQS219">
         Merged Thomas Fischers' patch which supports left joins, right
         joins and explicit inner joins. I communicated with Thomas to make
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message