You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Claude Warren (JIRA)" <ji...@apache.org> on 2016/03/08 22:32:40 UTC
[jira] [Resolved] (JENA-1153) QueryBuilder does not allow order
direction to be specified
[ https://issues.apache.org/jira/browse/JENA-1153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claude Warren resolved JENA-1153.
---------------------------------
Resolution: Fixed
Fix Version/s: Jena 3.1.0
Issue is fixed.
There are now multiple addOrderBy() methods half of which take an Order argument.
> QueryBuilder does not allow order direction to be specified
> -----------------------------------------------------------
>
> Key: JENA-1153
> URL: https://issues.apache.org/jira/browse/JENA-1153
> Project: Apache Jena
> Issue Type: Bug
> Components: QueryBuilder
> Affects Versions: Jena 3.1.0
> Reporter: Matthew Glubb
> Assignee: Claude Warren
> Fix For: Jena 3.1.0
>
>
> Order direction cannot be specified when using the QueryBuilder. Consider the following:
> {code}
> (new SelectBuilder()).addWhere("?a", "?b", "?c").addOrderBy("DESC(?a)").buildString()
> {code}
> Actual:
> {code}
> SELECT *
> WHERE
> { ?a ?b ?c }
> ORDER BY ?DESC(?a)
> {code}
> Expected:
> {code}
> SELECT *
> WHERE
> { ?a ?b ?c }
> ORDER BY DESC(?a)
> {code}
> It seems the QueryBuilder assumes that only a field name will ever be passed and tried to be 'helpful' by prepending a '?' if it is omitted.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)