active_orm 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_orm/redis/connection.rb +2 -2
- data/lib/active_orm/redis/hash.rb +2 -2
- data/lib/active_orm/redis/list.rb +2 -4
- data/lib/active_orm/redis/set.rb +7 -12
- data/lib/active_orm/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4deb75501ba7da047700c92bb852e9a4de02e398
|
4
|
+
data.tar.gz: 679eec5ed195d5a9c20760d90f59d8b7b74e350b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 907c5dc02a065cd7c68326593eb9b796389c7073ea43e554c72361922a66f12362fe77ffa3a366e033436b9516e69a560f2f58fef3ebe14cd6d10aff3ea425f5
|
7
|
+
data.tar.gz: a915205ad07aa5451f99cbfd71b0f527bde1fc4d444586b9aac33727e87631cad8142b0b6153d07c1cf65ca62eac9704c8142c3b61b5964908244315790cd258
|
@@ -88,8 +88,8 @@ class ActiveOrm::Redis::Connection < ActiveOrm::Redis
|
|
88
88
|
client.time
|
89
89
|
end
|
90
90
|
|
91
|
-
def self.with_reconnect(
|
92
|
-
client.with_reconnect(
|
91
|
+
def self.with_reconnect(&block)
|
92
|
+
client.with_reconnect(true, &block)
|
93
93
|
end
|
94
94
|
|
95
95
|
def self.without_reconnect(&block)
|
@@ -51,7 +51,7 @@ class ActiveOrm::Redis::Hash < ActiveOrm::Redis
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def self.create_each(key, *args)
|
54
|
-
client.hmset(normalize_key(key),
|
54
|
+
client.hmset(normalize_key(key), args)
|
55
55
|
end
|
56
56
|
|
57
57
|
def self.increment(key, field, value)
|
@@ -65,7 +65,7 @@ class ActiveOrm::Redis::Hash < ActiveOrm::Redis
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def self.destroy(key, *args)
|
68
|
-
client.hdel(normalize_key(key),
|
68
|
+
client.hdel(normalize_key(key), args)
|
69
69
|
end
|
70
70
|
|
71
71
|
def self.scan(key, cursor, opts = {})
|
@@ -22,14 +22,12 @@ class ActiveOrm::Redis::List < ActiveOrm::Redis
|
|
22
22
|
|
23
23
|
def self.between(key, start = 1, finish = 0)
|
24
24
|
value = client.lrange(normalize_key(key), (start - 1), (finish - 1))
|
25
|
-
|
26
|
-
value
|
25
|
+
metatransform(value)
|
27
26
|
end
|
28
27
|
|
29
28
|
def self.all(key)
|
30
29
|
value = client.lrange(normalize_key(key), 0, -1)
|
31
|
-
|
32
|
-
value
|
30
|
+
metatransform(value)
|
33
31
|
end
|
34
32
|
|
35
33
|
def self.count(key)
|
data/lib/active_orm/redis/set.rb
CHANGED
@@ -2,32 +2,27 @@ class ActiveOrm::Redis::Set < ActiveOrm::Redis
|
|
2
2
|
|
3
3
|
def self.find(key)
|
4
4
|
value = client.smembers(normalize_key(key))
|
5
|
-
|
6
|
-
value
|
5
|
+
metatransform(value)
|
7
6
|
end
|
8
7
|
|
9
8
|
def self.combine(*args)
|
10
9
|
value = client.sunion(*args)
|
11
|
-
|
12
|
-
value
|
10
|
+
metatransform(value)
|
13
11
|
end
|
14
12
|
|
15
13
|
def self.difference(*args)
|
16
14
|
value = client.sdiff(*args)
|
17
|
-
|
18
|
-
value
|
15
|
+
metatransform(value)
|
19
16
|
end
|
20
17
|
|
21
18
|
def self.intersection(key, *args)
|
22
19
|
value = client.sinter(normalize_key(key), *args)
|
23
|
-
|
24
|
-
value
|
20
|
+
metatransform(value)
|
25
21
|
end
|
26
22
|
|
27
23
|
def self.sample(key, value = 1)
|
28
24
|
value = client.srandmember(normalize_key(key), value)
|
29
|
-
|
30
|
-
value
|
25
|
+
metatransform(value)
|
31
26
|
end
|
32
27
|
|
33
28
|
def self.value?(key, value)
|
@@ -43,7 +38,7 @@ class ActiveOrm::Redis::Set < ActiveOrm::Redis
|
|
43
38
|
end
|
44
39
|
|
45
40
|
def self.create_combination(key, *args)
|
46
|
-
client.sunionstore(normalize_key(key),
|
41
|
+
client.sunionstore(normalize_key(key), args)
|
47
42
|
end
|
48
43
|
|
49
44
|
def self.create_difference(key, *args)
|
@@ -51,7 +46,7 @@ class ActiveOrm::Redis::Set < ActiveOrm::Redis
|
|
51
46
|
end
|
52
47
|
|
53
48
|
def self.create_intersection(key, *args)
|
54
|
-
client.sinterstore(normalize_key(key),
|
49
|
+
client.sinterstore(normalize_key(key), args)
|
55
50
|
end
|
56
51
|
|
57
52
|
def self.move(key, destination, value)
|
data/lib/active_orm/version.rb
CHANGED