Class: Arel::Nodes::OnConflict
- Inherits:
-
Node
- Object
- Node
- Arel::Nodes::OnConflict
- Defined in:
- lib/active_record_upsert/arel/nodes/on_conflict.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#target ⇒ Object
Returns the value of attribute target.
-
#where ⇒ Object
Returns the value of attribute where.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize ⇒ OnConflict
constructor
A new instance of OnConflict.
Constructor Details
#initialize ⇒ OnConflict
Returns a new instance of OnConflict.
6 7 8 9 10 11 |
# File 'lib/active_record_upsert/arel/nodes/on_conflict.rb', line 6 def initialize super @target = nil @action = nil @where = nil end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
4 5 6 |
# File 'lib/active_record_upsert/arel/nodes/on_conflict.rb', line 4 def action @action end |
#target ⇒ Object
Returns the value of attribute target.
4 5 6 |
# File 'lib/active_record_upsert/arel/nodes/on_conflict.rb', line 4 def target @target end |
#where ⇒ Object
Returns the value of attribute where.
4 5 6 |
# File 'lib/active_record_upsert/arel/nodes/on_conflict.rb', line 4 def where @where end |
Instance Method Details
#eql?(other) ⇒ Boolean
17 18 19 20 21 |
# File 'lib/active_record_upsert/arel/nodes/on_conflict.rb', line 17 def eql? other self.class == other.class && self.target == other.target && self.update_statement == other.update_statement end |
#hash ⇒ Object
13 14 15 |
# File 'lib/active_record_upsert/arel/nodes/on_conflict.rb', line 13 def hash [@target, @action].hash end |