valkey-objects 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/valkey/objects/version.rb +1 -1
- data/lib/valkey/objects.rb +9 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62927bbac6643c13516511a2c328cbc766bfe7f158768a96f95a8ce3cbd827aa
|
4
|
+
data.tar.gz: 307fe0a9827410d1ddf7f6a9b6cb3470d0643bef7a15542723dc1062c3f8edb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a679b9e5a8e6ec0a674478392044bde83808b6dc97018beac21ef340222d023f5c2b3e02030fbae1adbab5d469f79a4ce78db40180dc3682e432b86dc6917686
|
7
|
+
data.tar.gz: 203a4c234d1669e05f19311f6c4f6389de9100bdb13c777d85605507ae71f42e57fe79ac52c1ad73c764c2828ee9c61364aa2b1bc0bf8045d6c8bd58637506cd
|
data/lib/valkey/objects.rb
CHANGED
@@ -167,6 +167,12 @@ module VK
|
|
167
167
|
def initialize k
|
168
168
|
@key = k
|
169
169
|
end
|
170
|
+
def delete!
|
171
|
+
VK.redis.call("DEL", key);
|
172
|
+
end
|
173
|
+
def expire sec
|
174
|
+
VK.redis.call("EXPIRE", key, sec);
|
175
|
+
end
|
170
176
|
end
|
171
177
|
|
172
178
|
class N < O
|
@@ -260,6 +266,9 @@ module VK
|
|
260
266
|
def []= k,v
|
261
267
|
VK.redis.call("HMSET", key, k, v);
|
262
268
|
end
|
269
|
+
def to_h
|
270
|
+
VK.redis.call("HGETALL", key);
|
271
|
+
end
|
263
272
|
end
|
264
273
|
|
265
274
|
class Q < O
|