sparql 3.1.2 → 3.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/sinatra/sparql.rb +1 -1
- data/lib/sparql.rb +2 -0
- data/lib/sparql/algebra.rb +4 -4
- data/lib/sparql/algebra/expression.rb +0 -7
- data/lib/sparql/algebra/extensions.rb +3 -4
- data/lib/sparql/algebra/operator.rb +0 -7
- data/lib/sparql/grammar.rb +0 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f623228f6e6d10b6b8221219ba1b7b6fcfdf8410db716cb400ed50b5e59f7d25
|
4
|
+
data.tar.gz: 8678296e2d0744c5d8dbbc0ac424c7c8b0e2540fa730a03960e961b9c2f08b33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2b53c1cbf504ac9818d2a6ee0b03b9703e447698c5d2edcef697d49a4a7eaca63f563511440ec8e15e2bf64b8a91290b15eaf5aac2261c5fdd59a88a779fa66
|
7
|
+
data.tar.gz: 19a3844b38131cbc1cfa63a8109602fe07c98b58af4c8eef77cbb3bc668a055872582aa529e8b06ab27e873aacbc2b882abb435ab61148294f28fe4391024cdc
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.1.
|
1
|
+
3.1.3
|
data/lib/sinatra/sparql.rb
CHANGED
data/lib/sparql.rb
CHANGED
data/lib/sparql/algebra.rb
CHANGED
@@ -142,15 +142,15 @@ module SPARQL
|
|
142
142
|
#
|
143
143
|
# Operator(:isBlank).new(RDF::Node(:foobar)).to_sxp #=> "(isBlank _:foobar)"
|
144
144
|
# Operator(:isIRI).new(RDF::URI('https://rubygems.org/gems/rdf/')).to_sxp #=> "(isIRI <https://rubygems.org/gems/rdf/>)"
|
145
|
-
# Operator(:isLiteral).new(RDF::Literal(3.1415)).to_sxp #=> "(isLiteral 3.
|
146
|
-
# Operator(:str).new(Operator(:datatype).new(RDF::Literal(3.1415))).to_sxp #=> "(str (datatype 3.
|
145
|
+
# Operator(:isLiteral).new(RDF::Literal(3.1415)).to_sxp #=> "(isLiteral 3.1415e0)"
|
146
|
+
# Operator(:str).new(Operator(:datatype).new(RDF::Literal(3.1415))).to_sxp #=> "(str (datatype 3.1415e0))"
|
147
147
|
#
|
148
148
|
# ## Constructing operator expressions using SSE forms
|
149
149
|
#
|
150
150
|
# SPARQL::Algebra::Expression[:isBlank, RDF::Node(:foobar)].to_sxp #=> "(isBlank _:foobar)"
|
151
151
|
# SPARQL::Algebra::Expression[:isIRI, RDF::URI('https://rubygems.org/gems/rdf/')].to_sxp #=> "(isIRI <https://rubygems.org/gems/rdf/>)"
|
152
|
-
# SPARQL::Algebra::Expression[:isLiteral, RDF::Literal(3.1415)].to_sxp #=> "(isLiteral 3.
|
153
|
-
# SPARQL::Algebra::Expression[:str, [:datatype, RDF::Literal(3.1415)]].to_sxp #=> "(str (datatype 3.
|
152
|
+
# SPARQL::Algebra::Expression[:isLiteral, RDF::Literal(3.1415)].to_sxp #=> "(isLiteral 3.1415e0)"
|
153
|
+
# SPARQL::Algebra::Expression[:str, [:datatype, RDF::Literal(3.1415)]].to_sxp #=> "(str (datatype 3.1415e0))"
|
154
154
|
#
|
155
155
|
# ## Constructing operator expressions using SSE strings
|
156
156
|
#
|
@@ -20,13 +20,6 @@ module SPARQL; module Algebra
|
|
20
20
|
# @yieldreturn [void] ignored
|
21
21
|
# @return [Expression]
|
22
22
|
def self.parse(sse, **options, &block)
|
23
|
-
begin
|
24
|
-
require 'sxp' # @see https://rubygems.org/gems/sxp
|
25
|
-
rescue LoadError
|
26
|
-
abort "SPARQL::Algebra::Expression.parse requires the SXP gem (hint: `gem install sxp')."
|
27
|
-
end
|
28
|
-
require 'sparql/algebra/sxp_extensions'
|
29
|
-
|
30
23
|
sse = sse.encode(Encoding::UTF_8)
|
31
24
|
sxp = SXP::Reader::SPARQL.new(sse) do |reader|
|
32
25
|
# Set base_uri if we have one
|
@@ -427,6 +427,7 @@ class RDF::Query
|
|
427
427
|
variables.values
|
428
428
|
end
|
429
429
|
|
430
|
+
alias_method :optimize_without_expression!, :optimize!
|
430
431
|
##
|
431
432
|
# Optimize the query, removing lexical shortcuts in URIs
|
432
433
|
#
|
@@ -441,11 +442,9 @@ class RDF::Query
|
|
441
442
|
term
|
442
443
|
end
|
443
444
|
end
|
444
|
-
RDF::Query::Pattern.from(components)
|
445
|
-
end.sort! do |a, b|
|
446
|
-
(a.cost || 0) <=> (b.cost || 0)
|
445
|
+
RDF::Query::Pattern.from(components, **pattern.options)
|
447
446
|
end
|
448
|
-
self
|
447
|
+
self.optimize_without_expression!(**options)
|
449
448
|
end
|
450
449
|
|
451
450
|
##
|
@@ -571,13 +571,6 @@ module SPARQL; module Algebra
|
|
571
571
|
#
|
572
572
|
# @return [String]
|
573
573
|
def to_sxp
|
574
|
-
begin
|
575
|
-
require 'sxp' # @see https://rubygems.org/gems/sxp
|
576
|
-
rescue LoadError
|
577
|
-
abort "SPARQL::Algebra::Operator#to_sxp requires the SXP gem (hint: `gem install sxp')."
|
578
|
-
end
|
579
|
-
require 'sparql/algebra/sxp_extensions'
|
580
|
-
|
581
574
|
to_sxp_bin.to_sxp
|
582
575
|
end
|
583
576
|
|
data/lib/sparql/grammar.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sparql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregg Kellogg
|
8
8
|
- Arto Bendiken
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-10-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdf
|
@@ -414,7 +414,7 @@ homepage: https://github.com/ruby-rdf/sparql
|
|
414
414
|
licenses:
|
415
415
|
- Unlicense
|
416
416
|
metadata: {}
|
417
|
-
post_install_message:
|
417
|
+
post_install_message:
|
418
418
|
rdoc_options: []
|
419
419
|
require_paths:
|
420
420
|
- lib
|
@@ -429,8 +429,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
429
429
|
- !ruby/object:Gem::Version
|
430
430
|
version: '0'
|
431
431
|
requirements: []
|
432
|
-
rubygems_version: 3.1.
|
433
|
-
signing_key:
|
432
|
+
rubygems_version: 3.1.4
|
433
|
+
signing_key:
|
434
434
|
specification_version: 4
|
435
435
|
summary: SPARQL Query and Update library for Ruby.
|
436
436
|
test_files: []
|