Class: LD::Patch::Algebra::Prefix
- Inherits:
-
SPARQL::Algebra::Operator::Binary
- Object
- SPARQL::Algebra::Operator
- SPARQL::Algebra::Operator::Binary
- LD::Patch::Algebra::Prefix
- Includes:
- SPARQL::Algebra::Update
- Defined in:
- vendor/bundler/ruby/3.3.0/bundler/gems/ld-patch-a8edc852261e/lib/ld/patch/algebra/prefix.rb
Overview
The LD Patch prefix
operator.
Constant Summary collapse
- NAME =
:prefix
Constants inherited from SPARQL::Algebra::Operator::Binary
SPARQL::Algebra::Operator::Binary::ARITY
Constants inherited from SPARQL::Algebra::Operator
SPARQL::Algebra::Operator::ARITY, SPARQL::Algebra::Operator::IsURI, SPARQL::Algebra::Operator::URI
Constants included from SPARQL::Algebra::Expression
SPARQL::Algebra::Expression::PATTERN_PARENTS
Constants included from RDF::Util::Logger
Instance Attribute Summary
Attributes inherited from SPARQL::Algebra::Operator
Instance Method Summary collapse
-
#execute(queryable, options = {}) {|solution| ... } ⇒ RDF::Query::Solutions
Executes this query on the given
queryable
graph or repository. -
#optimize ⇒ Union, RDF::Query
Returns an optimized version of this query.
Methods included from SPARQL::Algebra::Update
#graph_name=, #unshift, #variables
Methods inherited from SPARQL::Algebra::Operator::Binary
Methods inherited from SPARQL::Algebra::Operator
#aggregate?, arity, base_uri, #base_uri, base_uri=, #bind, #boolean, #constant?, #deep_dup, #each_descendant, #eql?, #evaluatable?, evaluate, #executable?, #first_ancestor, for, #formulae, #initialize, #inspect, #mergable?, #ndvars, #node?, #operand, #optimize!, #parent, #parent=, #prefixes, prefixes, prefixes=, #rewrite, #to_binary, to_sparql, #to_sparql, #to_sxp, #to_sxp_bin, #validate!, #variable?, #variables, #vars
Methods included from SPARQL::Algebra::Expression
cast, #constant?, #evaluate, extension, extension?, extensions, for, #invalid?, new, #node?, open, #optimize!, parse, register_extension, #to_sxp_bin, #valid?, #validate!, #variable?
Methods included from RDF::Util::Logger
#log_debug, #log_depth, #log_error, #log_fatal, #log_info, #log_recover, #log_recovering?, #log_statistics, #log_warn, #logger
Constructor Details
This class inherits a constructor from SPARQL::Algebra::Operator::Binary
Instance Method Details
#execute(queryable, options = {}) {|solution| ... } ⇒ RDF::Query::Solutions
Executes this query on the given queryable
graph or repository.
Really a pass-through, as this is a syntactic object used for providing
context for URIs.
32 33 34 35 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/ld-patch-a8edc852261e/lib/ld/patch/algebra/prefix.rb', line 32 def execute(queryable, = {}, &block) debug() {"Prefix"} @solutions = queryable.query(operands.last, **.merge(depth: [:depth].to_i + 1), &block) end |
#optimize ⇒ Union, RDF::Query
Returns an optimized version of this query.
If optimize operands, and if the first two operands are both Queries, replace with the unique sum of the query elements
44 45 46 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/ld-patch-a8edc852261e/lib/ld/patch/algebra/prefix.rb', line 44 def optimize operands.last.optimize end |