You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Michael Bouschen (JIRA)" <ji...@apache.org> on 2015/01/02 23:59:34 UTC
[jira] [Commented] (JDO-650) Support for conditional operator ? :
in JDOQL
[ https://issues.apache.org/jira/browse/JDO-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14263301#comment-14263301 ]
Michael Bouschen commented on JDO-650:
--------------------------------------
Checked in a change (see revision 1649150).
It fixes the main method and the expected result in IfElseInFilter. I changed the second positive test to use a navigational expression in If/Else instead of the arithmtic expression. I also added a new negative test to both tck classes using expressions of different types in the then and the else-clause.
> 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)