Class: Arel::Nodes::InsertStatement

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#on_conflictObject

Returns the value of attribute on_conflict.



4
5
6
# File 'lib/active_record_upsert/arel/nodes/insert_statement.rb', line 4

def on_conflict
  @on_conflict
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
13
14
15
16
17
# File 'lib/active_record_upsert/arel/nodes/insert_statement.rb', line 10

def eql? other
  self.class == other.class &&
    self.relation == other.relation &&
    self.columns == other.columns &&
    self.select == other.select &&
    self.values == other.values &&
    self.on_conflict == other.on_conflict
end

#hashObject



6
7
8
# File 'lib/active_record_upsert/arel/nodes/insert_statement.rb', line 6

def hash
  [@relation, @columns, @values, @select, @on_conflict].hash
end