db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: svn commit: r330804 - /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/variables/VariablesWithoutExtent.java
Date Sat, 05 Nov 2005 00:36:17 GMT
Javadogs,

Did we really intend for the single string version of JDOQL to  
include "IMPORTS import..."?

setFilter("SELECT e FROM EMPLOYEE e WHERE e.grade <  
HardClass.HIGHEST_GRADE");
declareImports("import org.apache.jdo.tck.SimpleClass; import  
org.apache.jdo.tck.HardClass";

pm.newQuery("SELECT e FROM EMPLOYEE e WHERE e.grade <  
HardClass.HIGHEST_GRADE IMPORTS import  
org.apache.jdo.tck.SimpleClass; import org.apache.jdo.tck.HardClass");

Craig

Chapter 14:

void declareImports (String imports);
A14.6-8 [Bind the import statements to the query instance.] All  
imports must be declared in the same method call, and the imports  
must be separated by semicolons.

The import statements follow the Java syntax for import statements.  
Import statements are separated by semicolons. Import on demand is  
supported.

Single-string Query element binding
A14.6.13-1 [The String version of Query represents all query elements  
using a single string. The string contains the following structure:]
select [unique] [ <result> ] [into <result-class-name>]
[from <candidate-class-name> [exclude subclasses] ]
[where <filter>]
[variables <variables-clause> ]
[parameters <parameters-clause>]
[imports <imports-clause>]
...

<imports-clause> is the imports declaration as in 14.6.4. As in Java,  
imports in the clause are separated by semicolons.

Chapter 24:

Imports:
      imports ImportList

Import Declaration
This section describes the syntax of the declareImports argument.
ImportList:
      ImportDecls ;opt
ImportDecls:
      ImportDecl
      ImportDecls ; ImportDecl
ImportDecl:
      import QualifiedIdentifier
      import QualifiedIdentifier . *
Please note, as a usability feature ImportList defines the trailing  
semicolon as optional (in addition to what the Java syntax allows in  
an import statement).

JDOQLKeyword: one of
...
     having      HAVING      imports     IMPORTS
...


On Nov 4, 2005, at 5:17 AM, brazil@apache.org wrote:

> Author: brazil
> Date: Fri Nov  4 05:17:29 2005
> New Revision: 330804
>
> URL: http://svn.apache.org/viewcvs?rev=330804&view=rev
> Log:
> Bug fix: Java keyword 'import' was specified in capitals.
>
> Modified:
>     incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/ 
> jdoql/variables/VariablesWithoutExtent.java
>
> Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/ 
> query/jdoql/variables/VariablesWithoutExtent.java
> URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/ 
> java/org/apache/jdo/tck/query/jdoql/variables/ 
> VariablesWithoutExtent.java?rev=330804&r1=330803&r2=330804&view=diff
> ====================================================================== 
> ========
> --- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/ 
> jdoql/variables/VariablesWithoutExtent.java (original)
> +++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/ 
> jdoql/variables/VariablesWithoutExtent.java Fri Nov  4 05:17:29 2005
> @@ -58,7 +58,7 @@
>          /*WHERE*/       "this.personid = noExtent.id",
>          /*VARIABLES*/   "NoExtent noExtent",
>          /*PARAMETERS*/  null,
> -        /*IMPORTS*/     "IMPORT  
> org.apache.jdo.tck.pc.query.NoExtent;",
> +        /*IMPORTS*/     "import  
> org.apache.jdo.tck.pc.query.NoExtent;",
>          /*GROUP BY*/    null,
>          /*ORDER BY*/    null,
>          /*FROM*/        null,
>
>
>


Mime
View raw message