aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/select_manager.rb1
-rw-r--r--lib/arel/visitors/oracle.rb4
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/arel/select_manager.rb b/lib/arel/select_manager.rb
index 77853ea854..0fa344945e 100644
--- a/lib/arel/select_manager.rb
+++ b/lib/arel/select_manager.rb
@@ -152,6 +152,7 @@ module Arel
def except other
Nodes::Except.new ast, other.ast
end
+ alias :minus :except
def with *subqueries
if subqueries.first.is_a? Symbol
diff --git a/lib/arel/visitors/oracle.rb b/lib/arel/visitors/oracle.rb
index aaf0324fd7..3beea287a6 100644
--- a/lib/arel/visitors/oracle.rb
+++ b/lib/arel/visitors/oracle.rb
@@ -61,6 +61,10 @@ module Arel
"raw_rnum_ > #{visit o.expr}"
end
+ def visit_Arel_Nodes_Except o
+ "( #{visit o.left} MINUS #{visit o.right} )"
+ end
+
###
# Hacks for the order clauses specific to Oracle
def order_hacks o