You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Supports Unicode query strings both on all versions of Ruby.
30
-
* Provisional support for [SPARQL-star][].
30
+
* Provisional support for [SPARQL 1.2][].
31
31
32
32
## Description
33
33
@@ -68,17 +68,20 @@ Not supported:
68
68
*[Entailment Regimes][SPARQL 1.1 Entailment Regimes], and
69
69
*[Graph Store HTTP Protocol][SPARQL 1.1 Graph Store HTTP Protocol] but the closely related [Linked Data Platform][] implemented in [rdf-ldp](https://github.com/ruby-rdf/rdf-ldp) supports these use cases.
70
70
71
+
### Optimizations
72
+
Generally, optimizing a query can lead to improved performance, sometimes dramatically (e.g., `?s rdf:rest*/rdf:first ?o`). Optimization can be done when parsing a query using the `:optimize` option, or the `optimize` method on a parsed query.
73
+
71
74
### Updates for RDF 1.1
72
75
Starting with version 1.1.2, the SPARQL gem uses the 1.1 version of the [RDF.rb][], which adheres to [RDF 1.1 Concepts](https://www.w3.org/TR/rdf11-concepts/) rather than [RDF 1.0](https://www.w3.org/TR/rdf-concepts/). The main difference is that there is now no difference between a _Simple Literal_ (a literal with no datatype or language) and a Literal with datatype _xsd:string_; this causes some minor differences in the way in which queries are understood, and when expecting different results.
73
76
74
77
Additionally, queries now take a block, or return an `Enumerator`; this is in keeping with much of the behavior of [RDF.rb][] methods, including `Queryable#query`, and with version 1.1 or [RDF.rb][], Query#execute. As a consequence, all queries which used to be of the form `query.execute(repository)` may equally be called as `repository.query(query)`. Previously, results were returned as a concrete class implementing `RDF::Queryable` or `RDF::Query::Solutions`, these are now `Enumerators`.
75
78
76
-
### SPARQL 1.2
77
-
The gem supports some of the extensions proposed by the [SPARQL 1.2 Community Group](https://github.com/w3c/sparql-12). In particular, the following extensions are now implemented:
79
+
### SPARQL Dev
80
+
The gem supports some of the extensions proposed by the [SPARQL Dev Community Group](https://github.com/w3c/sparql-dev). In particular, the following extensions are now implemented:
78
81
79
-
*[SEP-0002: better support for Durations, Dates, and Times](https://github.com/w3c/sparql-12/blob/main/SEP/SEP-0002/sep-0002.md)
82
+
*[SEP-0002: better support for Durations, Dates, and Times](https://github.com/w3c/sparql-dev/blob/main/SEP/SEP-0002/sep-0002.md)
80
83
* This includes full support for `xsd:date`, `xsd:time`, `xsd:duration`, `xsd:dayTimeDuration`, and `xsd:yearMonthDuration` along with associated XPath/XQuery functions including a new `ADJUST` builtin. (**Note: This feature is subject to change or elimination as the standards process progresses.**)
81
-
*[SEP-0003: Property paths with a min/max hop](https://github.com/w3c/sparql-12/blob/main/SEP/SEP-0003/sep-0003.md)
84
+
*[SEP-0003: Property paths with a min/max hop](https://github.com/w3c/sparql-dev/blob/main/SEP/SEP-0003/sep-0003.md)
82
85
* This includes support for non-counting path forms such as `rdf:rest{1,3}` to match the union of paths `rdf:rest`, `rdf:rest/rdf:rest`, and `rdf:rest/rdf:rest/rdf:rest`. (**Note: This feature is subject to change or elimination as the standards process progresses.**)
83
86
84
87
### SPARQL Extension Functions
@@ -107,9 +110,9 @@ See {SPARQL::Algebra::Expression.register_extension} for details.
107
110
108
111
A call to execute a parsed query can include pre-bound variables, which cause queries to be executed with matching variables bound as defined. Variable pre-binding can be done using a Hash structure, or a Query Solution. See [Query with Binding example](#query-with-binding) and {SPARQL::Algebra::Query#execute}.
109
112
110
-
### SPARQLStar (SPARQL-star)
113
+
### SPARQL 1.2
111
114
112
-
The gem supports [SPARQL-star][] where patterns may include sub-patterns recursively, for a kind of Reification.
115
+
The gem supports [SPARQL 1.2][] where patterns may include sub-patterns recursively, for a kind of Reification.
113
116
114
117
For example, the following Turtle* file uses a statement as the subject of another statement:
115
118
@@ -170,7 +173,7 @@ As well as a `CONSTRUCT`:
170
173
<<?bob foaf:age ?age>> ?b ?c .
171
174
}
172
175
173
-
Note that results can be serialized only when the format supports [RDF-star][].
176
+
Note that results can be serialized only when the format supports [SPARQL 1,2][].
174
177
175
178
#### SPARQL results
176
179
@@ -462,8 +465,6 @@ see <https://unlicense.org/> or the accompanying {file:UNLICENSE}.
462
465
463
466
A copy of the [SPARQL EBNF][] and derived parser files are included in the repository, which are not covered under the UNLICENSE. These files are covered via the [W3C Document License](https://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231).
464
467
465
-
A copy of the [SPARQL 1.0 tests][] and [SPARQL 1.1 tests][] are also included in the repository, which are not covered under the UNLICENSE; see the references for test copyright information.
466
-
467
468
[Ruby]: https://ruby-lang.org/
468
469
[RDF]: https://www.w3.org/RDF/
469
470
[RDF::DO]: https://rubygems.org/gems/rdf-do
@@ -474,20 +475,17 @@ A copy of the [SPARQL 1.0 tests][] and [SPARQL 1.1 tests][] are also included in
0 commit comments