aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/arel/nodes
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-03-17 03:53:48 +0900
committerGitHub <noreply@github.com>2019-03-17 03:53:48 +0900
commit1db05065434e1b5341e6748632e310060e92b80d (patch)
tree234dd16076aa757c37c0c83f80d719b504b8d7d4 /activerecord/lib/arel/nodes
parent6486f80d3a3448579089fab1c8b7846c09cf87ec (diff)
parent97347d8c409f14b682dd9ec52ded3c869d0ba479 (diff)
downloadrails-1db05065434e1b5341e6748632e310060e92b80d.tar.gz
rails-1db05065434e1b5341e6748632e310060e92b80d.tar.bz2
rails-1db05065434e1b5341e6748632e310060e92b80d.zip
Merge pull request #35615 from kamipo/optimizer_hints
Support Optimizer Hints
Diffstat (limited to 'activerecord/lib/arel/nodes')
-rw-r--r--activerecord/lib/arel/nodes/select_core.rb5
-rw-r--r--activerecord/lib/arel/nodes/unary.rb1
2 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/lib/arel/nodes/select_core.rb b/activerecord/lib/arel/nodes/select_core.rb
index 73461ff683..5814cae98a 100644
--- a/activerecord/lib/arel/nodes/select_core.rb
+++ b/activerecord/lib/arel/nodes/select_core.rb
@@ -4,7 +4,7 @@ module Arel # :nodoc: all
module Nodes
class SelectCore < Arel::Nodes::Node
attr_accessor :projections, :wheres, :groups, :windows
- attr_accessor :havings, :source, :set_quantifier
+ attr_accessor :havings, :source, :set_quantifier, :optimizer_hints
def initialize
super()
@@ -42,7 +42,7 @@ module Arel # :nodoc: all
def hash
[
- @source, @set_quantifier, @projections,
+ @source, @set_quantifier, @projections, @optimizer_hints,
@wheres, @groups, @havings, @windows
].hash
end
@@ -51,6 +51,7 @@ module Arel # :nodoc: all
self.class == other.class &&
self.source == other.source &&
self.set_quantifier == other.set_quantifier &&
+ self.optimizer_hints == other.optimizer_hints &&
self.projections == other.projections &&
self.wheres == other.wheres &&
self.groups == other.groups &&
diff --git a/activerecord/lib/arel/nodes/unary.rb b/activerecord/lib/arel/nodes/unary.rb
index 00639304e4..6d1ac36b0e 100644
--- a/activerecord/lib/arel/nodes/unary.rb
+++ b/activerecord/lib/arel/nodes/unary.rb
@@ -35,6 +35,7 @@ module Arel # :nodoc: all
Not
Offset
On
+ OptimizerHints
Ordering
RollUp
}.each do |name|