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

Constructor Details

#initializeInsertStatement

Returns a new instance of InsertStatement.



36
37
38
39
40
41
42
43
# File 'lib/active_record_upsert/arel/nodes/insert_statement.rb', line 36

def initialize
  super()
  @relation = nil
  @columns  = []
  @values   = nil
  @select   = nil
  @on_conflict = nil
end

Instance Attribute Details

#on_conflictObject

Returns the value of attribute on_conflict.



34
35
36
# File 'lib/active_record_upsert/arel/nodes/insert_statement.rb', line 34

def on_conflict
  @on_conflict
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


49
50
51
52
53
54
55
56
# File 'lib/active_record_upsert/arel/nodes/insert_statement.rb', line 49

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



45
46
47
# File 'lib/active_record_upsert/arel/nodes/insert_statement.rb', line 45

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