db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/odmg/oql oql-ojb.g
Date Sat, 15 Mar 2003 16:39:25 GMT
brj         2003/03/15 08:39:25

  Modified:    src/java/org/apache/ojb/odmg/oql oql-ojb.g
  Log:
  Query refactoring
  
  Revision  Changes    Path
  1.12      +9 -9      db-ojb/src/java/org/apache/ojb/odmg/oql/oql-ojb.g
  
  Index: oql-ojb.g
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/oql/oql-ojb.g,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- oql-ojb.g	2 Mar 2003 15:41:52 -0000	1.11
  +++ oql-ojb.g	15 Mar 2003 16:39:25 -0000	1.12
  @@ -202,7 +202,7 @@
    * Names
    */
   
  -// BRJ: support -> and $ 
  +// BRJ: support -> and $
   protected
   NameFirstCharacter:
           ( 'A'..'Z' | 'a'..'z' | '_' | TOK_DOT | TOK_INDIRECT | TOK_DOLLAR );
  @@ -352,7 +352,7 @@
           query = selectQuery ( TOK_SEMIC )?
       ;
   
  -selectQuery returns [Query query = null] :
  +selectQuery returns [QueryByCriteria query = null] :
   
           {
               Class clazz = null;
  @@ -378,7 +378,6 @@
   
           "from" clazz = fromClause
           ( "where" whereClause[criteria] )?
  -        ( "order" "by" orderClause[criteria] )?
           {
               if (clazz != null) {
                   if (projectionAttrs[0].indexOf('.') < 0)
  @@ -396,6 +395,7 @@
                   }
               }
           }
  +        ( "order" "by" orderClause[query] )?
       ;
   
   existsQuery returns [Query query = null] :
  @@ -479,15 +479,15 @@
       }
     ;
   
  -orderClause[Criteria criteria] :
  +orderClause[QueryByCriteria query] :
   
  -        sortCriterion[criteria]
  +        sortCriterion[query]
           (
  -            TOK_COMMA sortCriterion[criteria]
  +            TOK_COMMA sortCriterion[query]
           )*
       ;
   
  -sortCriterion[Criteria criteria] :
  +sortCriterion[QueryByCriteria query] :
   
           { boolean descending = false; }
   
  @@ -502,9 +502,9 @@
   
           {
               if (descending) {
  -                criteria.addOrderByDescending(id.getText());
  +                query.addOrderByDescending(id.getText());
               } else {
  -                criteria.addOrderByAscending(id.getText());
  +                query.addOrderByAscending(id.getText());
               }
           }
       ;
  
  
  

Mime
View raw message