rdf-lmdb 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c021040c4ca9c7021c79808072cf55ce2c4f378f995726dfd7eec48c1f1b3ca
4
- data.tar.gz: 62d9f85388152eddb2f7965ac32cb4fcbb0955d35ab410fa36726632f8f235c0
3
+ metadata.gz: 0357ac470c10b3649667a3f2fe9890dce9443dd9401b062c3662f421570b3443
4
+ data.tar.gz: 3a716964ef9cd4c6ea64fe362e0cdf695c623dd9c7b27022ec5b73494982587c
5
5
  SHA512:
6
- metadata.gz: c76ff224facd0128e6554018bb85937a0f27175f061e2a59093ba007bd6c790330a93ec20c5346d0ba5ec45f242bad0f393d05b322b8d8ce80d705ee122af1f6
7
- data.tar.gz: 5771bec23b120002df5d94e2c8f1e85657409f447924cacb1f2ec464e1fab5751ac1adbaf5fe3286e7e96051fe012e530ddac8ead2097e3e39a0033195b599c1
6
+ metadata.gz: 0a2f42c88580b0d2d4351762f8445fc8d215078af41190996250465cab88402d3772d86844376271a88dcc7e2d500137a0bf91ea5ee0a35394f89c83d4b91183
7
+ data.tar.gz: 19b5f8bb2b11457e7be8dfc71ce8b606a3ef55af4de5bd0c7e3dce24dd010ae29bcea033b8f1fc8faaccdb764c54fb1ec2bcf7d3246087aab435aa59a9a79f8e
@@ -1,5 +1,5 @@
1
1
  module RDF
2
2
  module LMDB
3
- VERSION = "0.3.3"
3
+ VERSION = "0.3.5"
4
4
  end
5
5
  end
data/lib/rdf/lmdb.rb CHANGED
@@ -516,7 +516,7 @@ Currently you have to dump from the old layout and reload the new one. Sorry!
516
516
  pattern = pattern.to_h
517
517
 
518
518
  # flag if the graph is a variable
519
- gv = pattern[:graph_name] && pattern[:graph_name].variable?
519
+ gv = !pattern[:graph_name].nil? && pattern[:graph_name].variable?
520
520
 
521
521
  # hash of terms we get from the pattern
522
522
  thash = pattern.reject { |_, v| !v or v.variable? }
@@ -529,7 +529,7 @@ Currently you have to dump from the old layout and reload the new one. Sorry!
529
529
  ihash = thash.transform_values { |v| int_for v }
530
530
  cache = thash.keys.map { |k| [ihash[k], thash[k]] }.to_h
531
531
 
532
- body = -> do
532
+ body = -> _ = nil do
533
533
  # if the graph is nonexistent there is nothing to show
534
534
  return if thash[:graph_name] and !ihash[:graph_name]
535
535
 
@@ -585,14 +585,19 @@ Currently you have to dump from the old layout and reload the new one. Sorry!
585
585
  anchor = [ix].pack ?J
586
586
  return unless db.has? anchor
587
587
 
588
+ # warn "ix: #{ix} #{ihash.inspect} orr bug here?"
589
+
588
590
  db.each_value anchor do |spack|
589
- spo = @dbs[:statement][spack]
590
- return unless @dbs[:stmt2g].has? spack, ihash[:graph_name]
591
+ spo = @dbs[:statement][spack]
592
+ # warn "node: #{spack.unpack1 ?J} spo: #{spo.unpack 'J*'}"
593
+ gpack = [ihash[:graph_name]].pack ?J
594
+ next unless @dbs[:stmt2g].has? spack, gpack
591
595
  spo = resolve_terms spo
592
596
  yield RDF::Statement(*spo, graph_name: thash[:graph_name])
593
597
  end
594
598
  else
595
599
  # okay we will have either two or three terms
600
+ # warn 'lol bug here?'
596
601
 
597
602
  # select the pair of term keys with the lowest non-zero
598
603
  # cardinality
@@ -632,14 +637,14 @@ Currently you have to dump from the old layout and reload the new one. Sorry!
632
637
  end
633
638
  end
634
639
 
635
- #@lmdb.active_txn ? body.call : @lmdb.transaction(true, &body)
640
+ @lmdb.active_txn ? body.call : @lmdb.transaction(true, &body)
636
641
 
637
- ret = nil
638
- @lmdb.transaction do
639
- ret = body.call
640
- end
642
+ # ret = nil
643
+ # @lmdb.transaction do
644
+ # ret = body.call
645
+ # end
641
646
 
642
- ret
647
+ # ret
643
648
  end
644
649
 
645
650
  def log_mtime time = nil
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-lmdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Taylor
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-04-05 00:00:00.000000000 Z
10
+ date: 2025-05-24 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bundler
@@ -141,7 +140,6 @@ homepage: https://github.com/doriantaylor/rb-rdf-lmdb
141
140
  licenses:
142
141
  - Apache-2.0
143
142
  metadata: {}
144
- post_install_message:
145
143
  rdoc_options: []
146
144
  require_paths:
147
145
  - lib
@@ -156,8 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
154
  - !ruby/object:Gem::Version
157
155
  version: '0'
158
156
  requirements: []
159
- rubygems_version: 3.4.20
160
- signing_key:
157
+ rubygems_version: 3.6.3
161
158
  specification_version: 4
162
159
  summary: Symas LMDB back-end for RDF::Repository
163
160
  test_files: []