Closed abrokenjester closed 6 years ago
A partial implementation of a QueryBuilder
exists in RDF4J, but it is incomplete (only supporting SPARQL 1.0 features), and underdocumented and therefore somewhat hard to use. We could choose to either implement a new QueryBuilder from scratch, or extend/improve the existing builder to be easier to use and support more complex queries.
Supersed by #979
(Migrated from https://openrdf.atlassian.net/browse/SES-1065)
Currently, (SPARQL) queries are creating by inputting a full SPARQL query string and parsing it to produce a query algebra expression. An alternative way to build queries programmatically would be useful, for example a fluent-style builder object where one can do things like this:
TupleQuery query = new QueryBuilder.addSelect("x") .addTriple(String s, String p, String o) .addFilter(); ...etc.