torque-postgresql 1.1.7 → 1.1.8

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: 5ac2d4e3c96cf93edeac515986a6b7ba3ca412712c6eb19a38f09e0b0e5e448a
4
- data.tar.gz: 133b756202e8e39738d7bda361f3fd9544829ef817b7ac518f972bf175da93c1
3
+ metadata.gz: ba522771fa6306842ed61b6eb36b3de898398d186f9aa7a3ced33d5f2974708a
4
+ data.tar.gz: ac2f4da994afe5fbbe49bd8914bd01ee2404a18dbedb9e202c56012a24336aa0
5
5
  SHA512:
6
- metadata.gz: '08a2cb8062f7bdcf6497f4c2b33dc102c6df5d45ed5c82f6c772caeddb02f7a87056b06b13e6c09359b9db52dff46eabcb64f644e17682b1f830fdd988ff44ea'
7
- data.tar.gz: f419dd80f7a3c9972b0eb469ed63bf5454ede498ee688761f7c99587db8b2d48d06b5b40e4696a1760ea077f750d966a9e67a500b5b2d4b8b0fa3fccc1c0f884
6
+ metadata.gz: 715eabf972af8e33997af64888028c7c15625e124123fb890693ee8a48782f656c0fe8e944f9f49a7e6440babf53aacb5216e76b4d0a7b697e6825a964dd8ad6
7
+ data.tar.gz: 806ec5069889bd67ee3672035de94a0a6274919ff6aa45b78daf14185c78fb4682cc643531c7635dbc6e474c70ab6c217d0e0b6fe1d384ea00eda70e35f966b8
@@ -11,6 +11,10 @@ module Torque
11
11
  @inversed = self.target.present?
12
12
  end
13
13
 
14
+ def skip_statement_cache?(*)
15
+ super || reflection.connected_through_array?
16
+ end
17
+
14
18
  private
15
19
 
16
20
  def set_owner_attributes(record)
@@ -33,6 +33,7 @@ module Torque
33
33
  ids.each { |id| records[id].concat(Array.wrap(record)) }
34
34
  end
35
35
 
36
+ records.default_proc = nil
36
37
  owners.each do |owner|
37
38
  associate_records_to_owner(owner, records[owner[owner_key_name]] || [])
38
39
  end
@@ -56,8 +56,7 @@ module Torque
56
56
  end
57
57
  end
58
58
 
59
- # Scenic integration
60
- views(stream) if defined?(::Scenic)
59
+ table_extensions(stream)
61
60
  end
62
61
 
63
62
  # Dump user defined types like enum
@@ -80,6 +79,17 @@ module Torque
80
79
  stream.puts " create_enum \"#{name}\", [#{values.join(', ')}], force: :cascade"
81
80
  end
82
81
 
82
+ # Add compatibility to other gems that uses +tables+ as base function
83
+ def table_extensions(stream)
84
+ # Scenic integration
85
+ views(stream) if defined?(::Scenic)
86
+
87
+ # FX integration
88
+ functions(stream) if defined?(::Fx::SchemaDumper::Function)
89
+ aggregates(stream) if defined?(::Fx::SchemaDumper::Aggregate)
90
+ triggers(stream) if defined?(::Fx::SchemaDumper::Trigger)
91
+ end
92
+
83
93
  end
84
94
 
85
95
  if Torque::PostgreSQL::AR521
@@ -1,5 +1,5 @@
1
1
  module Torque
2
2
  module PostgreSQL
3
- VERSION = '1.1.7'
3
+ VERSION = '1.1.8'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torque-postgresql
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Silva
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-27 00:00:00.000000000 Z
11
+ date: 2021-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -260,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
260
260
  - !ruby/object:Gem::Version
261
261
  version: 1.8.11
262
262
  requirements: []
263
- rubygems_version: 3.1.4
263
+ rubygems_version: 3.2.14
264
264
  signing_key:
265
265
  specification_version: 4
266
266
  summary: ActiveRecord extension to access PostgreSQL advanced resources