isomorfeus-hamster 0.6.6 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isomorfeus/hamster/database.rb +6 -6
- data/lib/isomorfeus/hamster/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6647b48df1cbfd2b0a5693a20e95900c794c648a2df1bfc25952d4d7963f236
|
4
|
+
data.tar.gz: e24eedaf778490c7bc6d296343e3f205e52c56f6d2025f4276b29d8b28c93dd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f579bce116810735405fb5461c033a9d759207d748c0d3ec8b5fbcc07200c830f52064b64367d3f5c69c7a7d0268cb38c680f76a0d7e35dbc3a56ccf0a93712
|
7
|
+
data.tar.gz: 76782f3ecf8405d09a5913332d969f9a96adbc20a6d5cbfd8cf5781eac56aea2749f0969479d5bd73658ec507e673f776d5581d20b86da0c6248948cf72fd8e8
|
@@ -11,8 +11,8 @@ module Isomorfeus
|
|
11
11
|
# key, value = record
|
12
12
|
# puts "at #{key}: #{value}"
|
13
13
|
# end
|
14
|
-
def each
|
15
|
-
env.transaction
|
14
|
+
def each(readonly: true)
|
15
|
+
env.transaction readonly do
|
16
16
|
cursor do |c|
|
17
17
|
while i = c.next
|
18
18
|
yield(i)
|
@@ -54,9 +54,9 @@ module Isomorfeus
|
|
54
54
|
#
|
55
55
|
# @yield key [String] the next key in the database.
|
56
56
|
# @return [Enumerator] in lieu of a block.
|
57
|
-
def each_key(&block)
|
57
|
+
def each_key(readonly: true, &block)
|
58
58
|
return enum_for :each_key unless block_given?
|
59
|
-
env.transaction
|
59
|
+
env.transaction readonly do
|
60
60
|
cursor do |c|
|
61
61
|
while (rec = c.next true)
|
62
62
|
yield rec.first
|
@@ -71,7 +71,7 @@ module Isomorfeus
|
|
71
71
|
# @param key [#to_s] The key in question.
|
72
72
|
# @yield value [String] the next value associated with the key.
|
73
73
|
# @return [Enumerator] in lieu of a block.
|
74
|
-
def each_value(key, &block)
|
74
|
+
def each_value(key, readonly: true, &block)
|
75
75
|
return enum_for :each_value, key unless block_given?
|
76
76
|
|
77
77
|
value = get(key) or return
|
@@ -80,7 +80,7 @@ module Isomorfeus
|
|
80
80
|
return
|
81
81
|
end
|
82
82
|
|
83
|
-
env.transaction
|
83
|
+
env.transaction readonly do
|
84
84
|
cursor do |c|
|
85
85
|
method = :set
|
86
86
|
while rec = c.send(method, key)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-hamster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brotli
|
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '0'
|
135
135
|
requirements: []
|
136
|
-
rubygems_version: 3.3.
|
136
|
+
rubygems_version: 3.3.7
|
137
137
|
signing_key:
|
138
138
|
specification_version: 4
|
139
139
|
summary: KV store and ObjectDB for Isomorfeus.
|