Class: SPARQL::Algebra::Operator::Reduced
- Inherits:
-
Unary
- Object
- SPARQL::Algebra::Operator
- Unary
- SPARQL::Algebra::Operator::Reduced
- Includes:
- Query
- Defined in:
- lib/sparql/algebra/operator/reduced.rb
Overview
The SPARQL GraphPattern reduced operator.
Constant Summary
- NAME =
[:reduced]
Constants inherited from Unary
Constants inherited from SPARQL::Algebra::Operator
Instance Attribute Summary
Attributes included from Query
Attributes inherited from SPARQL::Algebra::Operator
Instance Method Summary (collapse)
-
- (RDF::Query::Solutions) execute(queryable, options = {})
Executes this query on the given
queryablegraph or repository. -
- (Union, RDF::Query) optimize
Returns an optimized version of this query.
Methods included from Query
#context=, #each_solution, #failed?, #matched?, #unshift, #variables
Methods inherited from Unary
Methods inherited from SPARQL::Algebra::Operator
arity, base_uri, #base_uri, base_uri=, #boolean, #constant?, #eql?, #evaluatable?, evaluate, #executable?, for, #initialize, #inspect, #operand, prefixes, #prefixes, prefixes=, #to_sse, #to_sxp, #variable?
Methods included from Evaluatable
Methods included from Expression
cast, #constant?, #evaluate, for, new, open, parse, #to_sse, #variable?
Constructor Details
This class inherits a constructor from SPARQL::Algebra::Operator::Unary
Instance Method Details
- (RDF::Query::Solutions) execute(queryable, options = {})
Executes this query on the given queryable graph or repository.
Removes duplicate solutions from the solution set.
30 31 32 33 34 |
# File 'lib/sparql/algebra/operator/reduced.rb', line 30 def execute(queryable, = {}) @solutions = operands.last. execute(queryable, .merge(:depth => [:depth].to_i + 1)). reduced end |
- (Union, RDF::Query) optimize
Returns an optimized version of this query.
Return optimized query
42 43 44 |
# File 'lib/sparql/algebra/operator/reduced.rb', line 42 def optimize operands = operands.map(&:optimize) end |