switchman 3.0.2 → 3.0.3

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
  SHA256:
3
- metadata.gz: 1224320ec4f3ff0d8f05d1c5537ce06f33932e4c9da069d82183aa7562e1cab4
4
- data.tar.gz: 1cd6f52c82fbdea9c3aac4c569b291428d2476abc4a2198c09beb1da64700473
3
+ metadata.gz: e5760f08a540406e8e7d546f0104c1ff8833ce7610daba34810b53ffe5caa295
4
+ data.tar.gz: 4bf65b183425addbec13ae77d9e4f1e3b89244afbcf9625a7e86717e216ce778
5
5
  SHA512:
6
- metadata.gz: 052e1675cb5d6b07844dab24c802c6f98b8e75fe4c0146a407e275d89633b5c3058801538a2537f82a7798260ad9d5dd2989536ad88d06a37bb33cf9082444dd
7
- data.tar.gz: ebaa91ea8f6be5f878ac2f8b57a7954853603cb20770f083263fd369774cedc4b33c8127a8b17746bbf4e5b91e1e742df2970be8dab08aa708baae3bc130b988
6
+ metadata.gz: e3e6467f46cb98d78e53b96b1661dbb0cfb59efd25cade9d5f1f2bde4ba067478871c42f91bd06c11c42ed6153c37fca9ef0a20555f3598f910dbda17ce9b42c
7
+ data.tar.gz: eba93dc04390850eba1a7224bcf5f8fbd5b272133cbac94211c512df023a3e9a7d3951267b55bbc831012f03d443ff6705f74c601bc41a05efb389ecae4240c2
@@ -87,6 +87,10 @@ module Switchman
87
87
  name.quoted
88
88
  end
89
89
 
90
+ def with_global_table_name(&block)
91
+ with_local_table_name(false, &block)
92
+ end
93
+
90
94
  def with_local_table_name(enable = true) # rubocop:disable Style/OptionalBooleanParameter
91
95
  old_value = @use_local_table_name
92
96
  @use_local_table_name = enable
@@ -239,6 +239,10 @@ module Switchman
239
239
  connection.with_local_table_name { super }
240
240
  end
241
241
 
242
+ def table_name_matches?(from)
243
+ connection.with_global_table_name { super }
244
+ end
245
+
242
246
  def transpose_predicates(predicates,
243
247
  source_shard,
244
248
  target_shard,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Switchman
4
- VERSION = '3.0.2'
4
+ VERSION = '3.0.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: switchman
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-06-09 00:00:00.000000000 Z
13
+ date: 2021-06-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord