jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Karpov (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (JCR-952) Support lower and upper case functions in "order by" clause
Date Tue, 28 Sep 2010 06:49:36 GMT

    [ https://issues.apache.org/jira/browse/JCR-952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12915623#action_12915623
] 

Alexander Karpov edited comment on JCR-952 at 9/28/10 2:47 AM:
---------------------------------------------------------------

I have changed 
\openjpa\openjpa-kernel\src\main\jjtree\org\apache\openjpa\kernel\jpql\JPQL.jjt
void orderby_extension() #ORDERBYEXTENSION : { }
{
    aggregate_select_expression()
}
to 
void orderby_extension() #ORDERBYEXTENSION : { }
{
    aggregate_select_expression() | upper()
}
and it works 
Developers, who knows code well, any potential problems I can meet due to my fix?
Thanks.

      was (Author: alexkarpov):
    I have changed 
\openjpa\openjpa-kernel\src\main\jjtree\org\apache\openjpa\kernel\jpql\JPQL.jjt
void orderby_extension() #ORDERBYEXTENSION : { }
{
    aggregate_select_expression()
}
to 
void orderby_extension() #ORDERBYEXTENSION : { }
{
    aggregate_select_expression()
    upper()
}
and it works 
Developers, who knows code well, any potential problems I can meet due to my fix?
Thanks.
  
> Support lower and upper case functions in "order by" clause
> -----------------------------------------------------------
>
>                 Key: JCR-952
>                 URL: https://issues.apache.org/jira/browse/JCR-952
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-core, query
>    Affects Versions: 1.3
>            Reporter: James Hang
>            Priority: Minor
>
> The query languages should support lower- and upper-case functions within the "order
by" clause.  This would provide case-insensitive ordering of query results.
> Example:  Find all "nt:base" nodes ordered by the "foo" property, but ignoring case
> In XPath:
> //element(*,nt:base) order by fn:lower-case(@foo)
> In SQL:
> SELECT * FROM nt:base ORDER BY lower(foo)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message