Skip to content

Commit d95d776

Browse files
author
Anna
committed
moved select_manager to it's own file
1 parent 188f9bb commit d95d776

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed
File renamed without changes.

lib/arel/visitors/sqlserver.rb

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
require 'arel'
2-
2+
require 'arel/select_manager_sqlserver'
33
module Arel
4+
5+
module Nodes
6+
7+
# Extending the Ordering class to be comparison friendly which allows us to call #uniq on a
8+
# collection of them. See SelectManager#order for more details.
9+
class Ordering < Arel::Nodes::Unary
10+
def hash
11+
expr.hash
12+
end
13+
def ==(other)
14+
other.is_a?(Arel::Nodes::Ordering) && self.expr == other.expr
15+
end
16+
def eql?(other)
17+
self == other
18+
end
19+
end
20+
21+
end
22+
423
module Visitors
524
class SQLServer < Arel::Visitors::ToSql
625

@@ -9,6 +28,7 @@ class SQLServer < Arel::Visitors::ToSql
928
# SQLServer ToSql/Visitor (Overides)
1029

1130
def visit_Arel_Nodes_SelectStatement(o, a)
31+
puts "o.cores.size#{o.cores.size}" unless o.cores.size < 2
1232
if complex_count_sql?(o)
1333
visit_Arel_Nodes_SelectStatementForComplexCount(o, a)
1434
elsif o.offset

0 commit comments

Comments
 (0)