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:
parent
c48539ff94
commit
0f917da01a
1 changed files with 8 additions and 13 deletions
|
@ -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 &&
|
||||
|
|
Loading…
Reference in a new issue