1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove unused accessors left and right on DeleteStatement

Use `relation` and `wheres` instead.
This commit is contained in:
Ryuta Kamizono 2021-03-05 23:48:19 +09:00
parent c48539ff94
commit 0f917da01a

View file

@ -3,17 +3,12 @@
module Arel # :nodoc: all
module Nodes
class DeleteStatement < Arel::Nodes::Node
attr_accessor :left, :right, :orders, :limit, :offset, :key
alias :relation :left
alias :relation= :left=
alias :wheres :right
alias :wheres= :right=
attr_accessor :relation, :wheres, :orders, :limit, :offset, :key
def initialize(relation = nil, wheres = [])
super()
@left = relation
@right = wheres
@relation = relation
@wheres = wheres
@orders = []
@limit = nil
@offset = nil
@ -22,18 +17,18 @@ module Arel # :nodoc: all
def initialize_copy(other)
super
@left = @left.clone if @left
@right = @right.clone if @right
@relation = @relation.clone if @relation
@wheres = @wheres.clone if @wheres
end
def hash
[self.class, @left, @right, @orders, @limit, @offset, @key].hash
[self.class, @relation, @wheres, @orders, @limit, @offset, @key].hash
end
def eql?(other)
self.class == other.class &&
self.left == other.left &&
self.right == other.right &&
self.relation == other.relation &&
self.wheres == other.wheres &&
self.orders == other.orders &&
self.limit == other.limit &&
self.offset == other.offset &&