db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew T. Adams" <matthew.ad...@xcalia.com>
Subject RE: Issue 152: Redundant IMPORTS keyword
Date Wed, 28 Dec 2005 18:52:18 GMT
Provided that we could use "import" or "IMPORT", that would be fine.
 
An alternative, although not so compatible between the API and string
versions, is to support the keyword "import" followed by a comma-separated,
semicolon-terminated list of imports:
 
SELECT UNIQUE firstname, lastname 
INTO FullName 
FROM Employee 
WHERE salary > 1000 && projects.contains(p) && p.budget > 30000
VARIABLES Project p 
IMPORT org.apache.jdo.tck.query.result.classes.FullName,
org.apache.jdo.tck.pc.company.Person, org.apache.jdo.tck.pc.company.Project;
 
If we updated the spec (14.6.4) to allow this comma-separated,
semicolon-terminated list in addition to the initial syntax, I think it
would be intuitive:
 
<proposal>
14.6.4 Import statements
The import statements follow the Java syntax for import statements. Import
on demand is
supported.
 
Additionally, import statements may be expressed as a comma-separated,
semicolon-terminated list of elements.  For example, both
 
import org.example.Foo;
import org.example.Bar;
import org.example.util.*;
 
and
 
import org.example.Foo, org.example.Bar, org.example.util.*;
 
would be supported.
</proposal>

-----Original Message-----
From: Craig.Russell@Sun.COM [mailto:Craig.Russell@Sun.COM] 
Sent: Tuesday, December 27, 2005 7:01 PM
To: JDO Expert Group; Apache JDO project
Subject: Issue 152: Redundant IMPORTS keyword


Javadogs, 


The keyword IMPORTS seems to be redundant. It introduces a series of
statements each of which begins "import ...;". The keyword import could
stand alone without the introductory IMPORTS.


I think it would be better if we omitted the IMPORTS keyword entirely, so
e.g. instead of:
SELECT UNIQUE firstname, lastname 
INTO FullName 
FROM Employee 
WHERE salary > 1000 && projects.contains(p) && p.budget > 30000
VARIABLES Project p 
IMPORTS import org.apache.jdo.tck.query.result.classes.FullName; 
import org.apache.jdo.tck.pc.company.Person 
import org.apache.jdo.tck.pc.company.Project; 


we would have:
SELECT UNIQUE firstname, lastname 
INTO FullName 
FROM Employee 
WHERE salary > 1000 && projects.contains(p) && p.budget > 30000
VARIABLES Project p 
import org.apache.jdo.tck.query.result.classes.FullName; 
import org.apache.jdo.tck.pc.company.Person 
import org.apache.jdo.tck.pc.company.Project; 

Craig


Craig Russell

Architect, Sun Java Enterprise System http://java.sun.com/products/jdo

408 276-5638 mailto:Craig.Russell@sun.com

P.S. A good JDO? O, Gasp!



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message