protocol-redis 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/protocol/redis/methods/hashes.rb +15 -2
- data/lib/protocol/redis/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c41c131d63e6ae475e086880ebbaaf833374369a25a4111f19612254323cf64
|
4
|
+
data.tar.gz: 953c597e87f269af83413f7d36ea16b5da15dd75f689505bf46a2cf79d31c16e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83ef8872ca16bdeecb0083804cf31abc4e195b49ad408c6f2e7e93c2a4511afb8ef6e811455dbd3cce55946d83cfc2f00b4e1ac1394e28eb25881ecc8a4f0c44
|
7
|
+
data.tar.gz: ef60e6ccefda376a2b0efc91d1940bba209a18d9b9c22e09a36acca9c06666bb695e82535f5a79d5e7e2a9123c04bd10716a42cb302838719850327b723ea05f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -158,8 +158,8 @@ module Protocol
|
|
158
158
|
# @see https://redis.io/commands/hscan/
|
159
159
|
# @param cursor [Cursor]
|
160
160
|
# @return [Hash]
|
161
|
-
def hscan(cursor, match: nil, count: nil)
|
162
|
-
arguments = [cursor]
|
161
|
+
def hscan(key, cursor = "0", match: nil, count: nil)
|
162
|
+
arguments = [key, cursor]
|
163
163
|
|
164
164
|
if match
|
165
165
|
arguments.append("MATCH", match)
|
@@ -171,6 +171,19 @@ module Protocol
|
|
171
171
|
|
172
172
|
call("HSCAN", *arguments)
|
173
173
|
end
|
174
|
+
|
175
|
+
# Iterate over each field and the value of the hash, using HSCAN.
|
176
|
+
def hscan_each(key, cursor = "0", match: nil, count: nil, &block)
|
177
|
+
return enum_for(:hscan_each, key, cursor, match: match, count: count) unless block_given?
|
178
|
+
|
179
|
+
while true
|
180
|
+
cursor, data = hscan(key, cursor, match: match, count: count)
|
181
|
+
|
182
|
+
data.each_slice(2, &block)
|
183
|
+
|
184
|
+
break if cursor == "0"
|
185
|
+
end
|
186
|
+
end
|
174
187
|
end
|
175
188
|
end
|
176
189
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protocol-redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -45,7 +45,7 @@ cert_chain:
|
|
45
45
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
46
46
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
47
47
|
-----END CERTIFICATE-----
|
48
|
-
date:
|
48
|
+
date: 2024-02-13 00:00:00.000000000 Z
|
49
49
|
dependencies: []
|
50
50
|
description:
|
51
51
|
email:
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
|
-
rubygems_version: 3.
|
97
|
+
rubygems_version: 3.5.3
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: A transport agnostic RESP protocol client/server.
|
metadata.gz.sig
CHANGED
Binary file
|