Class: Arel::Nodes::OnConflict

Inherits:
Node
  • Object
show all
Defined in:
lib/active_record_upsert/arel/nodes/on_conflict.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOnConflict

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

#actionObject

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

#targetObject

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

#whereObject

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

Returns:

  • (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

#hashObject



13
14
15
# File 'lib/active_record_upsert/arel/nodes/on_conflict.rb', line 13

def hash
  [@target, @action].hash
end