activerecord-turntable 3.0.0.alpha2 → 3.0.0.alpha3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +6 -0
- data/lib/active_record/turntable/active_record_ext/association.rb +15 -9
- data/lib/active_record/turntable/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41a37244828a78c777c27525202b50624b38fe3d
|
4
|
+
data.tar.gz: 5c641a6137de50b3b86994b76ec711f074e078f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fa1f1bd2cbfeb0152f235feb507bcfc5ab2efc6b6aa722bc1ae711d21e1fe4e682b5c471422c71fe6189388fe16b7a68006b5eb99629ddcaba2f691f03647c4
|
7
|
+
data.tar.gz: 931b27608861d82164a1271ae28ffd4abda9374b67d0f71625c9eaa1f6a17f53bcfb6fc765ddf7157128abb38c99dc98835aa118ea622a5f050eec279431ccc4
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -11,16 +11,22 @@ module ActiveRecord::Turntable
|
|
11
11
|
|
12
12
|
protected
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
# @note Override to pass shard key conditions
|
15
|
+
def target_scope
|
16
|
+
return super unless should_use_shard_key?
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
scope = klass.where(
|
19
|
+
klass.turntable_shard_key =>
|
20
|
+
owner.send(foreign_shard_key)
|
21
|
+
)
|
22
|
+
super.merge!(scope)
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def skip_statement_cache?
|
28
|
+
super || should_use_shard_key?
|
29
|
+
end
|
24
30
|
end
|
25
31
|
end
|
26
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-turntable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.alpha3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gussan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-01-
|
12
|
+
date: 2017-01-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|