torque-postgresql 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/torque/postgresql/adapter/database_statements.rb +4 -4
- data/lib/torque/postgresql/autosave_association.rb +1 -2
- data/lib/torque/postgresql/geometry_builder.rb +1 -1
- data/lib/torque/postgresql/reflection/abstract_reflection.rb +4 -4
- data/lib/torque/postgresql/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: 1929f5d804c0491cc94149dde4af2c7ef7e57434
|
4
|
+
data.tar.gz: f76c493623230594387b9b007574e4c79b778c6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04a0d8aac7f5e29c80f2ab609b7e703524a6a04737291f68dcad0f47fc2967613771056342deb2bb4f94a731961731c94f7c8260b1041fb18e41feed47e10c7f
|
7
|
+
data.tar.gz: 964b8e4bed0f9a9b60ff83bd935dc41f6fd063592044d728e4aae4e7d56c6f28435e14961ce71d3b320a1b646bfbcc5181a820fac0777922d7189ad43418ae0b
|
@@ -35,11 +35,11 @@ module Torque
|
|
35
35
|
# Change some of the types being mapped
|
36
36
|
def initialize_type_map(m = type_map)
|
37
37
|
super
|
38
|
-
m.register_type 'box',
|
39
|
-
m.register_type 'circle',
|
38
|
+
m.register_type 'box', OID::Box.new
|
39
|
+
m.register_type 'circle', OID::Circle.new
|
40
40
|
m.register_type 'interval', OID::Interval.new
|
41
|
-
m.register_type 'line',
|
42
|
-
m.register_type 'segment',
|
41
|
+
m.register_type 'line', OID::Line.new
|
42
|
+
m.register_type 'segment', OID::Segment.new
|
43
43
|
end
|
44
44
|
|
45
45
|
# :nodoc:
|
@@ -3,8 +3,7 @@ module Torque
|
|
3
3
|
module AutosaveAssociation
|
4
4
|
module ClassMethods
|
5
5
|
def add_autosave_association_callbacks(reflection)
|
6
|
-
return super unless reflection.
|
7
|
-
reflection.macro.eql?(:belongs_to_many)
|
6
|
+
return super unless reflection.macro.eql?(:belongs_to_many)
|
8
7
|
|
9
8
|
save_method = :"autosave_associated_records_for_#{reflection.name}"
|
10
9
|
define_non_cyclic_method(save_method) { save_belongs_to_many_array(reflection) }
|
@@ -7,7 +7,7 @@ module Torque
|
|
7
7
|
|
8
8
|
def type
|
9
9
|
return self.class.const_get('TYPE') if self.class.const_defined?('TYPE')
|
10
|
-
self.class.const_set('TYPE', self.class.name.demodulize.underscore)
|
10
|
+
self.class.const_set('TYPE', self.class.name.demodulize.underscore.to_sym)
|
11
11
|
end
|
12
12
|
|
13
13
|
def pieces
|
@@ -19,8 +19,8 @@ module Torque
|
|
19
19
|
|
20
20
|
# Manually build the join constraint
|
21
21
|
def build_join_constraint(table, foreign_table)
|
22
|
-
klass_attr = table[torque_join_keys.key]
|
23
|
-
source_attr = foreign_table[torque_join_keys.foreign_key]
|
22
|
+
klass_attr = table[torque_join_keys.key.to_s]
|
23
|
+
source_attr = foreign_table[torque_join_keys.foreign_key.to_s]
|
24
24
|
|
25
25
|
result = build_id_constraint(klass_attr, source_attr)
|
26
26
|
result = table.create_and([result, klass.send(:type_condition, table)]) \
|
@@ -34,9 +34,9 @@ module Torque
|
|
34
34
|
return klass_attr.eq(source_attr) unless connected_through_array?
|
35
35
|
|
36
36
|
# Klass and key are associated with the reflection Class
|
37
|
-
klass_type = klass.columns_hash[torque_join_keys.key]
|
37
|
+
klass_type = klass.columns_hash[torque_join_keys.key.to_s]
|
38
38
|
# active_record and foreign_key are associated with the source Class
|
39
|
-
source_type = active_record.columns_hash[torque_join_keys.foreign_key]
|
39
|
+
source_type = active_record.columns_hash[torque_join_keys.foreign_key.to_s]
|
40
40
|
|
41
41
|
# If both are attributes but the left side is not an array, and the
|
42
42
|
# right side is, use the ANY operation
|
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.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|