This repository has been archived by the owner on Dec 29, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement operator/bgp instead of using RDF::Query directly, set cont…
…ext = false. Don't set context = false for graphs with a nil context, as this was modifying behavior of other packages that include sparql..
- Loading branch information
Showing
5 changed files
with
30 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.8 | ||
0.0.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module SPARQL; module Algebra | ||
class Operator | ||
## | ||
# The SPARQL GraphPattern `bgp` operator. | ||
# | ||
# Query with `context` set to false. | ||
# | ||
# @example | ||
# (prefix ((: <http://example/>)) | ||
# (bgp (triple ?s ?p ?o))) | ||
# | ||
# @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra | ||
class BGP < Operator | ||
NAME = [:bgp] | ||
## | ||
# A `graph` is an RDF::Query with a context. | ||
# | ||
# @param [RDF::URI, RDF::Query::Variable] context | ||
# @param [RDF::Query] bgp | ||
# @return [RDF::Query] | ||
def self.new(*patterns) | ||
RDF::Query.new(*patterns, :context => false) | ||
end | ||
end # BGP | ||
end # Operator | ||
end; end # SPARQL::Algebra |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters