Matthew Glubb created JENA-1153:
-----------------------------------
Summary: 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
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)