Class: Arel::Nodes::UpdateStatement
- Defined in:
- lib/arel/nodes/update_statement.rb
Instance Attribute Summary collapse
-
#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.
-
#values ⇒ Object
Returns the value of attribute values.
-
#wheres ⇒ Object
Returns the value of attribute wheres.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize ⇒ UpdateStatement
constructor
A new instance of UpdateStatement.
- #initialize_copy(other) ⇒ Object
Methods inherited from Node
#and, #equality?, #fetch_attribute, #invert, #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 ⇒ UpdateStatement
Returns a new instance of UpdateStatement.
8 9 10 11 12 13 14 15 16 |
# File 'lib/arel/nodes/update_statement.rb', line 8 def initialize @relation = nil @wheres = [] @values = [] @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/update_statement.rb', line 6 def key @key end |
#limit ⇒ Object
Returns the value of attribute limit.
6 7 8 |
# File 'lib/arel/nodes/update_statement.rb', line 6 def limit @limit end |
#offset ⇒ Object
Returns the value of attribute offset.
6 7 8 |
# File 'lib/arel/nodes/update_statement.rb', line 6 def offset @offset end |
#orders ⇒ Object
Returns the value of attribute orders.
6 7 8 |
# File 'lib/arel/nodes/update_statement.rb', line 6 def orders @orders end |
#relation ⇒ Object
Returns the value of attribute relation.
6 7 8 |
# File 'lib/arel/nodes/update_statement.rb', line 6 def relation @relation end |
#values ⇒ Object
Returns the value of attribute values.
6 7 8 |
# File 'lib/arel/nodes/update_statement.rb', line 6 def values @values end |
#wheres ⇒ Object
Returns the value of attribute wheres.
6 7 8 |
# File 'lib/arel/nodes/update_statement.rb', line 6 def wheres @wheres end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/arel/nodes/update_statement.rb', line 28 def eql?(other) self.class == other.class && self.relation == other.relation && self.wheres == other.wheres && self.values == other.values && self.orders == other.orders && self.limit == other.limit && self.offset == other.offset && self.key == other.key end |
#hash ⇒ Object
24 25 26 |
# File 'lib/arel/nodes/update_statement.rb', line 24 def hash [@relation, @wheres, @values, @orders, @limit, @offset, @key].hash end |
#initialize_copy(other) ⇒ Object
18 19 20 21 22 |
# File 'lib/arel/nodes/update_statement.rb', line 18 def initialize_copy(other) super @wheres = @wheres.clone @values = @values.clone end |