Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Jena 3.1.0
-
None
Description
Order direction cannot be specified when using the QueryBuilder. Consider the following:
(new SelectBuilder()).addWhere("?a", "?b", "?c").addOrderBy("DESC(?a)").buildString()
Actual:
SELECT * WHERE { ?a ?b ?c } ORDER BY ?DESC(?a)
Expected:
SELECT * WHERE { ?a ?b ?c } ORDER BY DESC(?a)
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.