Skip to content

Commit 58df95a

Browse files
committed
In clause cannot use ordering
1 parent b10e2b2 commit 58df95a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

lib/arel/visitors/sqlserver.rb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,30 @@ def visit_Make_Fetch_Happen o, collector
158158
collector
159159
end
160160

161+
def collect_in_clause(left, right, collector)
162+
163+
# binding.pry if $debugger
164+
#
165+
# if $debugger
166+
# binding.pry
167+
#
168+
# right.first.orders = []
169+
# $debugger = nil
170+
# end
171+
172+
173+
if Array === right
174+
right.each do |node|
175+
176+
if Arel::Nodes::SelectStatement === node
177+
node.orders = []
178+
end
179+
end
180+
end
181+
182+
super
183+
end
184+
161185
# SQLServer Helpers
162186

163187
def node_value(node)

0 commit comments

Comments
 (0)