surus 0.7.0 → 0.7.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 +5 -5
- data/CHANGELOG.md +4 -0
- data/lib/surus/json/belongs_to_scope_builder.rb +2 -2
- data/lib/surus/json/has_and_belongs_to_many_scope_builder.rb +7 -7
- data/lib/surus/json/has_many_scope_builder.rb +2 -2
- data/lib/surus/json/has_many_through_scope_builder.rb +2 -2
- data/lib/surus/version.rb +1 -1
- metadata +4 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 146108f790eb8b2115311b8207e048ca2f105abd2a9c19f571058f054f208fd9
|
4
|
+
data.tar.gz: 75d1f069806f3e404e60e1e55cfc9c8f9974b9299b6565ee1fa936736af0888a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 106a50454343b4b7446783883ea7b9e13646df5afb9ee4d794ebef510c23a528366dc20c4fdb78fdff2277f373cf58d0b4a92304a0a326803e4be50ab9c7937b
|
7
|
+
data.tar.gz: 63ad5e681f2dd3a01d4aafa2aca90e6737abad114ed2add5378bb3073f9036790b1d641516ab6689754078d70762f4ea3212291b44a21ff4822a42f8a5b2e615
|
data/CHANGELOG.md
CHANGED
@@ -10,11 +10,11 @@ module Surus
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def association_primary_key
|
13
|
-
"#{association.
|
13
|
+
"#{quote_table_name association.table_name}.#{quote_column_name association.active_record_primary_key}"
|
14
14
|
end
|
15
15
|
|
16
16
|
def association_foreign_key
|
17
|
-
"#{outside_class.
|
17
|
+
"#{quote_table_name outside_class.table_name}.#{quote_column_name association.foreign_key}"
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -5,33 +5,33 @@ module Surus
|
|
5
5
|
s = association
|
6
6
|
.klass
|
7
7
|
.joins("JOIN #{join_table} ON #{join_table}.#{association_foreign_key}=#{association_table}.#{association_primary_key}")
|
8
|
-
.where("#{outside_class.
|
8
|
+
.where("#{quote_table_name outside_class.table_name}.#{primary_key}=#{join_table}.#{foreign_key}")
|
9
9
|
s = s.instance_eval(&association.scope) if association.scope
|
10
10
|
s
|
11
11
|
end
|
12
12
|
|
13
13
|
def join_table
|
14
|
-
|
14
|
+
quote_table_name association.join_table
|
15
15
|
end
|
16
16
|
|
17
17
|
def primary_key
|
18
|
-
|
18
|
+
quote_table_name association.active_record_primary_key
|
19
19
|
end
|
20
20
|
|
21
21
|
def association_foreign_key
|
22
|
-
|
22
|
+
quote_column_name association.association_foreign_key
|
23
23
|
end
|
24
24
|
|
25
25
|
def foreign_key
|
26
|
-
|
26
|
+
quote_column_name association.foreign_key
|
27
27
|
end
|
28
28
|
|
29
29
|
def association_table
|
30
|
-
|
30
|
+
quote_table_name association.klass.table_name
|
31
31
|
end
|
32
32
|
|
33
33
|
def association_primary_key
|
34
|
-
|
34
|
+
quote_column_name association.association_primary_key
|
35
35
|
end
|
36
36
|
|
37
37
|
end
|
@@ -10,11 +10,11 @@ module Surus
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def outside_primary_key
|
13
|
-
"#{outside_class.
|
13
|
+
"#{quote_table_name outside_class.table_name}.#{connection.quote_column_name association.active_record_primary_key}"
|
14
14
|
end
|
15
15
|
|
16
16
|
def association_foreign_key
|
17
|
-
"#{association.
|
17
|
+
"#{quote_table_name association.table_name}.#{connection.quote_column_name association.foreign_key}"
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -30,7 +30,7 @@ module Surus
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def outside_table
|
33
|
-
outside_class.
|
33
|
+
quote_table_name outside_class.table_name
|
34
34
|
end
|
35
35
|
|
36
36
|
def outside_primary_key
|
@@ -42,7 +42,7 @@ module Surus
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def through_table
|
45
|
-
through_reflection.
|
45
|
+
quote_table_name through_reflection.table_name
|
46
46
|
end
|
47
47
|
|
48
48
|
def through_primary_key
|
data/lib/surus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: surus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Christensen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -233,19 +233,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
233
|
version: '0'
|
234
234
|
requirements: []
|
235
235
|
rubyforge_project: ''
|
236
|
-
rubygems_version: 2.6
|
236
|
+
rubygems_version: 2.7.6
|
237
237
|
signing_key:
|
238
238
|
specification_version: 4
|
239
239
|
summary: PostgreSQL Acceleration for ActiveRecord
|
240
|
-
test_files:
|
241
|
-
- spec/array/scope_spec.rb
|
242
|
-
- spec/database.yml
|
243
|
-
- spec/database.yml.travis
|
244
|
-
- spec/database_structure.sql
|
245
|
-
- spec/factories.rb
|
246
|
-
- spec/hstore/scope_spec.rb
|
247
|
-
- spec/hstore/serializer_spec.rb
|
248
|
-
- spec/json/json_spec.rb
|
249
|
-
- spec/spec_helper.rb
|
250
|
-
- spec/synchronous_commit/connection_spec.rb
|
251
|
-
- spec/synchronous_commit/model_spec.rb
|
240
|
+
test_files: []
|