postgres_with 0.0.1 → 0.0.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d632ffb65879e2262ae18f279584769d3c139594297d83821059bcd5e6d6763
|
4
|
+
data.tar.gz: 34b6bcb70c40ff3393020b1cb541b756e74dfd35415731a42eae868ce41cc6a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea222c7477b4ea330d0cf3d8b353df19215486ad63830e675772a0ff967dd8e2869cf5abcc0d853475d1e40997d887b1562a8ca42d643aba477e917fc39cfd1e
|
7
|
+
data.tar.gz: b21db070bbb98a266a6c9dcebe0131f9b044794522354bff8642a39a583f4c9c4a77a498bf6d4ebef88df9cae8c98b1a1d122f160c687e9942e44c92b42d106e
|
@@ -60,22 +60,22 @@ module ActiveRecord
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
def build_arel_with_extensions
|
64
|
-
arel = build_arel_without_extensions
|
63
|
+
def build_arel_with_extensions(aliases = nil)
|
64
|
+
arel = build_arel_without_extensions(aliases)
|
65
65
|
|
66
66
|
with_statements = with_values.flat_map do |with_value|
|
67
67
|
case with_value
|
68
68
|
when String
|
69
69
|
with_value
|
70
70
|
when Hash
|
71
|
-
with_value.map
|
71
|
+
with_value.map do |name, expression|
|
72
72
|
case expression
|
73
73
|
when String
|
74
74
|
select = Arel::Nodes::SqlLiteral.new "(#{expression})"
|
75
75
|
when ActiveRecord::Relation, Arel::SelectManager
|
76
76
|
select = Arel::Nodes::SqlLiteral.new "(#{expression.to_sql})"
|
77
77
|
end
|
78
|
-
Arel::Nodes::As.new Arel::Nodes::SqlLiteral.new("\"#{name
|
78
|
+
Arel::Nodes::As.new Arel::Nodes::SqlLiteral.new("\"#{name}\""), select
|
79
79
|
end
|
80
80
|
when Arel::Nodes::As
|
81
81
|
with_value
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postgres_with
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derrick Neier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|