Class: Arel::Nodes::DeleteStatement
- Defined in:
- lib/arel/nodes/delete_statement.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#left ⇒ Object
(also: #relation)
Returns the value of attribute left.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#orders ⇒ Object
Returns the value of attribute orders.
-
#right ⇒ Object
(also: #wheres)
Returns the value of attribute right.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(relation = nil, wheres = []) ⇒ DeleteStatement
constructor
A new instance of DeleteStatement.
- #initialize_copy(other) ⇒ Object
Methods inherited from Node
#and, #each, #not, #or, #to_sql
Methods included from FactoryMethods
#coalesce, #create_and, #create_false, #create_join, #create_on, #create_string_join, #create_table_alias, #create_true, #grouping, #lower
Constructor Details
#initialize(relation = nil, wheres = []) ⇒ DeleteStatement
Returns a new instance of DeleteStatement.
13 14 15 16 17 18 19 20 21 |
# File 'lib/arel/nodes/delete_statement.rb', line 13 def initialize(relation = nil, wheres = []) super() @left = relation @right = wheres @orders = [] @limit = nil @offset = nil @key = nil end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
6 7 8 |
# File 'lib/arel/nodes/delete_statement.rb', line 6 def key @key end |
#left ⇒ Object Also known as: relation
Returns the value of attribute left.
6 7 8 |
# File 'lib/arel/nodes/delete_statement.rb', line 6 def left @left end |
#limit ⇒ Object
Returns the value of attribute limit.
6 7 8 |
# File 'lib/arel/nodes/delete_statement.rb', line 6 def limit @limit end |
#offset ⇒ Object
Returns the value of attribute offset.
6 7 8 |
# File 'lib/arel/nodes/delete_statement.rb', line 6 def offset @offset end |
#orders ⇒ Object
Returns the value of attribute orders.
6 7 8 |
# File 'lib/arel/nodes/delete_statement.rb', line 6 def orders @orders end |
#right ⇒ Object Also known as: wheres
Returns the value of attribute right.
6 7 8 |
# File 'lib/arel/nodes/delete_statement.rb', line 6 def right @right end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
33 34 35 36 37 38 39 40 41 |
# File 'lib/arel/nodes/delete_statement.rb', line 33 def eql?(other) self.class == other.class && self.left == other.left && self.right == other.right && self.orders == other.orders && self.limit == other.limit && self.offset == other.offset && self.key == other.key end |
#hash ⇒ Object
29 30 31 |
# File 'lib/arel/nodes/delete_statement.rb', line 29 def hash [self.class, @left, @right, @orders, @limit, @offset, @key].hash end |
#initialize_copy(other) ⇒ Object
23 24 25 26 27 |
# File 'lib/arel/nodes/delete_statement.rb', line 23 def initialize_copy(other) super @left = @left.clone if @left @right = @right.clone if @right end |