Re: svn commit: r330804 - /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/quer
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache JDO Project > Re: svn commit: r330804 - /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/quer




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: svn commit: r330804 - /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/quer  
Michael Bouschen


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-07-05 01:45 AM

Hi Craig,

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

I agree, the leading IMPORTS keyword seems to be redundant. We followed
the rule that all the query elements are prefixed with a new keyword in
the single string version (WHERE <filter>, VARIABLES <variables-clause>,
etc.). For imports this is not really necessary, because each import
statement starts with a keyword import already. So we can safely skip
the leading IMPORTS.

Regards Michael
[vbcol=seagreen]
>
> 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:
> 


--
Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66
Fax.:++49/30/2175 2012		D-10783 Berlin







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:55 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register