active_record_shards 5.5.0 → 5.5.1
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/lib/active_record_shards/sql_comments.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0b496a0c370367f7639396f21e3d13e4fe7bb2db7cb8fc63eb51ae886647c5ae
|
|
4
|
+
data.tar.gz: ddefe194636a747f22dff14003aa3015e2de96b2da5662d441ce215421880d1d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 73f9d460ad01aa644ba19cb87908d0e7712892c1662f388b2ab4989be6a046971a0152af6bf39d676425ec4ecc26e630e9e284e57915336c21514e8a689b7820
|
|
7
|
+
data.tar.gz: ba96f5467ef07bcf5f18b438046b5fd3b49c67b880aab7c8b540bb63a9c437bad7c97f03a799b395b322df682a950716f10429a7da05ecb09955c0d12c8b3ce0
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
module ActiveRecordShards
|
|
3
3
|
module SqlComments
|
|
4
4
|
module Methods
|
|
5
|
-
def execute(query, name = nil)
|
|
5
|
+
def execute(query, name = nil, **kwargs)
|
|
6
6
|
shard = ActiveRecord::Base.current_shard_selection.shard
|
|
7
7
|
shard_text = shard ? "shard #{shard}" : 'unsharded'
|
|
8
8
|
replica = ActiveRecord::Base.current_shard_selection.on_replica?
|
|
9
9
|
replica_text = replica ? 'replica' : 'primary'
|
|
10
10
|
query = "/* #{shard_text} #{replica_text} */ " + query
|
|
11
|
-
super(query, name)
|
|
11
|
+
super(query, name, **kwargs)
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_record_shards
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.5.
|
|
4
|
+
version: 5.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Benjamin Quorning
|
|
@@ -13,7 +13,7 @@ authors:
|
|
|
13
13
|
autorequire:
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
|
-
date:
|
|
16
|
+
date: 2024-05-13 00:00:00.000000000 Z
|
|
17
17
|
dependencies:
|
|
18
18
|
- !ruby/object:Gem::Dependency
|
|
19
19
|
name: activerecord
|
|
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
200
200
|
- !ruby/object:Gem::Version
|
|
201
201
|
version: '0'
|
|
202
202
|
requirements: []
|
|
203
|
-
rubygems_version: 3.
|
|
203
|
+
rubygems_version: 3.5.9
|
|
204
204
|
signing_key:
|
|
205
205
|
specification_version: 4
|
|
206
206
|
summary: Simple database switching for ActiveRecord.
|