arel 7.1.2 → 7.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +9 -0
- data/lib/arel.rb +1 -1
- data/lib/arel/visitors/depth_first.rb +0 -1
- data/lib/arel/visitors/dot.rb +7 -1
- data/lib/arel/visitors/oracle.rb +13 -2
- 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: 60798bcc684ea3ced1a4f162f9949b5bab2e0970
|
4
|
+
data.tar.gz: 5c2c10c8903f1d6ea662e750069957f346389f7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 536f6c961442b0ac33e4a8da505dd40ce1ede1906ecace4c6768353fb7a8bc7bcb8761ad25dec3ca62a6e666c7d625497c331c10fd7cf71be049033367c60f82
|
7
|
+
data.tar.gz: d71eb8659cadc5bc8dbfe1631632a5c05e4356ac7ace6cb1db2456e35631eeeac6b341c5f853bd49100b84a1cb602aacda8f9450ff2063c34a2b7406c61799f8
|
data/History.txt
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
=== 7.1.3 / 2016-10-07
|
2
|
+
|
3
|
+
* bug fixes
|
4
|
+
|
5
|
+
* Remove union mapping as :binary node when performing DepthFirst enumeration
|
6
|
+
* Fix invalid BindParam output in Dot visitor
|
7
|
+
* Add Arel::Nodes::Casted to dot visitor
|
8
|
+
* Use Arel::Nodes::BindParam in Oracle visitor for queries using both LIMIT and OFFSET
|
9
|
+
|
1
10
|
=== 7.1.2 / 2016-09-13
|
2
11
|
|
3
12
|
* bug fixes
|
data/lib/arel.rb
CHANGED
@@ -98,7 +98,6 @@ module Arel
|
|
98
98
|
alias :visit_Arel_Nodes_Regexp :binary
|
99
99
|
alias :visit_Arel_Nodes_RightOuterJoin :binary
|
100
100
|
alias :visit_Arel_Nodes_TableAlias :binary
|
101
|
-
alias :visit_Arel_Nodes_Union :binary
|
102
101
|
alias :visit_Arel_Nodes_Values :binary
|
103
102
|
alias :visit_Arel_Nodes_When :binary
|
104
103
|
|
data/lib/arel/visitors/dot.rb
CHANGED
@@ -155,6 +155,11 @@ module Arel
|
|
155
155
|
visit_edge o, "name"
|
156
156
|
end
|
157
157
|
|
158
|
+
def visit_Arel_Nodes_Casted o
|
159
|
+
visit_edge o, 'val'
|
160
|
+
visit_edge o, 'attribute'
|
161
|
+
end
|
162
|
+
|
158
163
|
def visit_Arel_Attribute o
|
159
164
|
visit_edge o, "relation"
|
160
165
|
visit_edge o, "name"
|
@@ -204,7 +209,6 @@ module Arel
|
|
204
209
|
alias :visit_NilClass :visit_String
|
205
210
|
alias :visit_TrueClass :visit_String
|
206
211
|
alias :visit_FalseClass :visit_String
|
207
|
-
alias :visit_Arel_Nodes_BindParam :visit_String
|
208
212
|
alias :visit_Integer :visit_String
|
209
213
|
alias :visit_Fixnum :visit_String
|
210
214
|
alias :visit_BigDecimal :visit_String
|
@@ -212,6 +216,8 @@ module Arel
|
|
212
216
|
alias :visit_Symbol :visit_String
|
213
217
|
alias :visit_Arel_Nodes_SqlLiteral :visit_String
|
214
218
|
|
219
|
+
def visit_Arel_Nodes_BindParam o; end
|
220
|
+
|
215
221
|
def visit_Hash o
|
216
222
|
o.each_with_index do |pair, i|
|
217
223
|
edge("pair_#{i}") { visit pair }
|
data/lib/arel/visitors/oracle.rb
CHANGED
@@ -26,11 +26,22 @@ module Arel
|
|
26
26
|
FROM ("
|
27
27
|
|
28
28
|
collector = super(o, collector)
|
29
|
-
|
29
|
+
|
30
|
+
if offset.expr.is_a? Nodes::BindParam
|
31
|
+
offset_bind = nil
|
32
|
+
collector << ') raw_sql_ WHERE rownum <= ('
|
33
|
+
collector.add_bind(offset.expr) { |i| offset_bind = ":a#{i}" }
|
34
|
+
collector << ' + '
|
35
|
+
collector.add_bind(limit) { |i| ":a#{i}" }
|
36
|
+
collector << ") ) WHERE raw_rnum_ > #{offset_bind}"
|
37
|
+
return collector
|
38
|
+
else
|
39
|
+
collector << ") raw_sql_
|
30
40
|
WHERE rownum <= #{offset.expr.to_i + limit}
|
31
41
|
)
|
32
42
|
WHERE "
|
33
|
-
|
43
|
+
return visit(offset, collector)
|
44
|
+
end
|
34
45
|
end
|
35
46
|
|
36
47
|
if o.limit
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.1.
|
4
|
+
version: 7.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Patterson
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-
|
14
|
+
date: 2016-10-07 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: minitest
|