fresh_connection 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0939ebfd084f8d11d439b33bf518efeafb55024
|
4
|
+
data.tar.gz: 225f106ccf4acfabdd53d6285b57f346860a046b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ee3bf8d6c0ac45ae16a5ae3326b03c931f4d0803f174b4eb96eb1183873d26f9af3212f194618d98f318602d77ddf6ccc5e10f010775763d8f0171b7ea413f2
|
7
|
+
data.tar.gz: 88c1456fd03b69733edd6caf910ff58b93b974bf93ad18fc10cbcb03dc2c0a741f05624e6d70cd2c239e9ae2a4b34ddc523eae92fd1d8b08820cf509da7c5b6f
|
@@ -1,5 +1,12 @@
|
|
1
1
|
module ActiveRecord
|
2
2
|
class Relation
|
3
|
+
def calculate_with_slave_connection(operation, column_name, options = {})
|
4
|
+
FreshConnection::SlaveConnection.manage_access(@klass, (go_slave? && options[:readonly] != false)) do
|
5
|
+
calculate_without_slave_connection(operation, column_name, options)
|
6
|
+
end
|
7
|
+
end
|
8
|
+
alias_method_chain :calculate, :slave_connection
|
9
|
+
|
3
10
|
private
|
4
11
|
|
5
12
|
def exec_queries_with_slave_connection
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fresh_connection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tsukasa OISHI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|