Class: Arel::Nodes::InsertStatement
- Inherits:
-
Object
- Object
- Arel::Nodes::InsertStatement
- Defined in:
- lib/active_record_upsert/arel/nodes/insert_statement.rb
Instance Attribute Summary collapse
-
#on_conflict ⇒ Object
Returns the value of attribute on_conflict.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize ⇒ InsertStatement
constructor
A new instance of InsertStatement.
Constructor Details
#initialize ⇒ InsertStatement
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_conflict ⇒ Object
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
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 |
#hash ⇒ Object
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 |