Class: Arel::Nodes::DeleteStatement
- Defined in:
- lib/arel/nodes/delete_statement.rb
Instance Attribute Summary collapse
-
#groups ⇒ Object
Returns the value of attribute groups.
-
#havings ⇒ Object
Returns the value of attribute havings.
-
#key ⇒ Object
Returns the value of attribute key.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#orders ⇒ Object
Returns the value of attribute orders.
-
#relation ⇒ Object
Returns the value of attribute relation.
-
#wheres ⇒ Object
Returns the value of attribute wheres.
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, #equality?, #fetch_attribute, #invert, #not, #or, #to_sql
Methods included from FactoryMethods
#cast, #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.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/arel/nodes/delete_statement.rb', line 8 def initialize(relation = nil, wheres = []) super() @relation = relation @wheres = wheres @groups = [] @havings = [] @orders = [] @limit = nil @offset = nil @key = nil end |
Instance Attribute Details
#groups ⇒ Object
Returns the value of attribute groups.
6 7 8 |
# File 'lib/arel/nodes/delete_statement.rb', line 6 def groups @groups end |
#havings ⇒ Object
Returns the value of attribute havings.
6 7 8 |
# File 'lib/arel/nodes/delete_statement.rb', line 6 def havings @havings end |
#key ⇒ Object
Returns the value of attribute key.
6 7 8 |
# File 'lib/arel/nodes/delete_statement.rb', line 6 def key @key 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 |
#relation ⇒ Object
Returns the value of attribute relation.
6 7 8 |
# File 'lib/arel/nodes/delete_statement.rb', line 6 def relation @relation end |
#wheres ⇒ Object
Returns the value of attribute wheres.
6 7 8 |
# File 'lib/arel/nodes/delete_statement.rb', line 6 def wheres @wheres end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/arel/nodes/delete_statement.rb', line 30 def eql?(other) self.class == other.class && self.relation == other.relation && self.wheres == other.wheres && self.orders == other.orders && self.groups == other.groups && self.havings == other.havings && self.limit == other.limit && self.offset == other.offset && self.key == other.key end |
#hash ⇒ Object
26 27 28 |
# File 'lib/arel/nodes/delete_statement.rb', line 26 def hash [self.class, @relation, @wheres, @orders, @limit, @offset, @key].hash end |
#initialize_copy(other) ⇒ Object
20 21 22 23 24 |
# File 'lib/arel/nodes/delete_statement.rb', line 20 def initialize_copy(other) super @relation = @relation.clone if @relation @wheres = @wheres.clone if @wheres end |