File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 11require 'arel'
2-
2+ require 'arel/select_manager_sqlserver'
33module 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
You can’t perform that action at this time.
0 commit comments