relix 2.3.1 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +4 -0
- data/lib/relix/index.rb +1 -1
- data/lib/relix/index_set.rb +1 -1
- data/lib/relix/indexes/primary_key.rb +1 -1
- data/lib/relix/indexes/unique.rb +3 -2
- data/lib/relix/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: a05e8c67fc3744926111a13579f71d5f9c667527
|
4
|
+
data.tar.gz: 7c01d06f773737fb4b696d23c561131ca5f679ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5ef9a8f8a69734071d709e940f2fb644d19c7f59a686390a18148c093eabfe7f0e2626377d195c911993bd501e17e8fadcc0010f8c167ef0f50b58faffdf6ed
|
7
|
+
data.tar.gz: 3301697337164bff88312f504aca6f46389810872fd6545769172ba45ced689c5cd520acfd5824dead203f75573bd841ec7231f67cf0ec014e1691ccb8ab4073
|
data/HISTORY.md
CHANGED
data/lib/relix/index.rb
CHANGED
data/lib/relix/index_set.rb
CHANGED
@@ -140,7 +140,7 @@ module Relix
|
|
140
140
|
if index.index?(redis, object, value)
|
141
141
|
new_current_values[name] = value unless index.attribute_immutable?
|
142
142
|
next if value == old_value
|
143
|
-
next unless index.filter(redis, object, value)
|
143
|
+
next unless index.filter(redis, pk, object, value)
|
144
144
|
|
145
145
|
query_value = index.query(redis, value)
|
146
146
|
proc do
|
data/lib/relix/indexes/unique.rb
CHANGED
@@ -14,8 +14,9 @@ module Relix
|
|
14
14
|
hash_name
|
15
15
|
end
|
16
16
|
|
17
|
-
def filter(r, object, value)
|
18
|
-
|
17
|
+
def filter(r, pk, object, value)
|
18
|
+
v = r.hget(hash_name, value)
|
19
|
+
if(v && (v != pk))
|
19
20
|
raise NotUniqueError.new("'#{value}' is not unique in index #{name}")
|
20
21
|
end
|
21
22
|
super
|
data/lib/relix/version.rb
CHANGED