Skip to content

Commit f753da9

Browse files
committed
Update some query calling sequences.
1 parent a5d0e43 commit f753da9

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/ld/patch/algebra/path.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ def execute(queryable, options = {})
5252
case op
5353
when RDF::URI
5454
terms.map do |subject|
55-
queryable.query(subject: subject, predicate: op).map(&:object)
55+
queryable.query({subject: subject, predicate: op}).map(&:object)
5656
end.flatten
5757
when SPARQL::Algebra::Query
5858
# Get path solutions for each term for op
59-
op.execute(queryable, options.merge(terms: terms)).map do |soln|
59+
op.execute(queryable, **options.merge(terms: terms)).map do |soln|
6060
soln.path
6161
end.flatten
6262
else

lib/ld/patch/algebra/prefix.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Prefix < SPARQL::Algebra::Operator::Binary
3131
# @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
3232
def execute(queryable, options = {}, &block)
3333
debug(options) {"Prefix"}
34-
@solutions = queryable.query(operands.last, options.merge(depth: options[:depth].to_i + 1), &block)
34+
@solutions = queryable.query(operands.last, **options.merge(depth: options[:depth].to_i + 1), &block)
3535
end
3636

3737
##

lib/ld/patch/algebra/reverse.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def execute(queryable, options = {})
3030
terms = Array(options.fetch(:terms))
3131

3232
results = terms.map do |object|
33-
queryable.query(object: object, predicate: op).map(&:subject)
33+
queryable.query({object: object, predicate: op}).map(&:subject)
3434
end.flatten
3535

3636
RDF::Query::Solutions.new(results.map {|t| RDF::Query::Solution.new(path: t)})

lib/ld/patch/algebra/update_list.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def execute(queryable, options = {})
3535
var_or_iri = solution[var_or_iri]
3636
end
3737

38-
list_heads = queryable.query(subject: var_or_iri, predicate: predicate).map {|s| s.object}
38+
list_heads = queryable.query({subject: var_or_iri, predicate: predicate}).map {|s| s.object}
3939

4040
raise LD::Patch::Error, "UpdateList ambigious value for #{var_or_iri.to_ntriples} and #{predicate.to_ntriples}" if list_heads.length > 1
4141
raise LD::Patch::Error, "UpdateList no value found for #{var_or_iri.to_ntriples} and #{predicate.to_ntriples}" if list_heads.empty?

0 commit comments

Comments
 (0)