
|
If you were logged in you would be able to see more operations.
|
|
|
JPOX Core
Created: 06/Jun/06 10:49 PM
Updated: 08/Jan/09 11:24 AM
|
|
| Component/s: |
None
|
| Affects Version/s: |
1.1.0
|
| Fix Version/s: |
None
|
|
|
Extend JDOQL to allow definition of named sets, variables and arrays. In SQL the similar result is obtained with using SUBQueries, however the subqueries allows only one column to be returned.
The named sets, variables and arrays can have any value as like:
Set<Person>
List<Dog>
Set<String>
String
String[]
Integer[]
etc...
The named values can be declared in this form:
WITH Set person AS SELECT FROM Person
SELECT...
Here is another example:
WITH String name AS SELECT UNIQUE name FROM Person where lastName == 'Buddy'
WITH Set person AS SELECT FROM Person
SELECT...
The usage is exemplified below
WITH Integer average AS SELECT avg(age) FROM Person
SELECT FROM Person where age > average
The query using WITH can be compiled/solved in one or more steps. It will vary upon the dependencies from one SELECT to another one. The example using the avg operation can be solved in one step, however the below query many not. (To be further designed)
WITH Set employees AS SELECT FROM Employee
SELECT FROM Person where employess.contains(this)
|
|
Description
|
Extend JDOQL to allow definition of named sets, variables and arrays. In SQL the similar result is obtained with using SUBQueries, however the subqueries allows only one column to be returned.
The named sets, variables and arrays can have any value as like:
Set<Person>
List<Dog>
Set<String>
String
String[]
Integer[]
etc...
The named values can be declared in this form:
WITH Set person AS SELECT FROM Person
SELECT...
Here is another example:
WITH String name AS SELECT UNIQUE name FROM Person where lastName == 'Buddy'
WITH Set person AS SELECT FROM Person
SELECT...
The usage is exemplified below
WITH Integer average AS SELECT avg(age) FROM Person
SELECT FROM Person where age > average
The query using WITH can be compiled/solved in one or more steps. It will vary upon the dependencies from one SELECT to another one. The example using the avg operation can be solved in one step, however the below query many not. (To be further designed)
WITH Set employees AS SELECT FROM Employee
SELECT FROM Person where employess.contains(this)
|
Show » |
|