[ 
https://issues.apache.org/jira/browse/JDO-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14257658#comment-14257658
 ] 

Michael Bouschen commented on JDO-650:
--------------------------------------

I will fix 1. and 2. soon. 

About the second positive test using a filter "IF (this.department.name == 
'Development') this.salary > 15000 ELSE this.salary > 25000":
It might be supported using the latest derby version. The derby doc 
http://wiki.apache.org/db-derby/SQLvsDerbyFeatures says, "Extended CASE 
expression" is supported from version 10.11. 

However, I agree we should restrict the if-expression such that it is supported 
by more databases. So I will change the second positive test.

What is the right name for the supported expressions in the then clause and the 
else clause? I found 'scalar expression' and 'value expression'. But I could 
not find a good definition for the two. Any suggestion?

> Support for conditional operator ? : in JDOQL
> ---------------------------------------------
>
>                 Key: JDO-650
>                 URL: https://issues.apache.org/jira/browse/JDO-650
>             Project: JDO
>          Issue Type: New Feature
>          Components: specification, tck
>    Affects Versions: JDO 2 maintenance release 2 (2.2)
>            Reporter: Michael Bouschen
>            Assignee: Michael Bouschen
>             Fix For: JDO 3.1
>
>
> JDOQL should support the Java conditional operator ? :, e.g. salary >= 1000.0 
> ? salary : salary * 1.1
> The conditional operator can be mapped to the CASE-expression in SQL: CASE 
> WHEN condition THEN thenExpr ELSE elseExpr END. Are there any issues with 
> non-SQL datastores when supporting the conditional operator? 
> Another question: which part of a JDOQL query can include a conditional 
> expression? I propose the query filter, the having clause and the result 
> specification.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to