Class: ActiveRecord::MassInsert::Statement
- Inherits:
-
Object
- Object
- ActiveRecord::MassInsert::Statement
- Defined in:
- lib/activerecord/mass_insert/statement.rb
Overview
Common structure for all SQL statement builders
Direct Known Subclasses
Instance Attribute Summary collapse
-
#mapped_columns ⇒ Object
readonly
Returns the value of attribute mapped_columns.
-
#matching_columns ⇒ Object
readonly
Returns the value of attribute matching_columns.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
Instance Method Summary collapse
-
#initialize(model, payload, *matching_columns, **mapped_columns) ⇒ Statement
constructor
A new instance of Statement.
Constructor Details
#initialize(model, payload, *matching_columns, **mapped_columns) ⇒ Statement
Returns a new instance of Statement.
9 10 11 12 13 14 |
# File 'lib/activerecord/mass_insert/statement.rb', line 9 def initialize(model, payload, *matching_columns, **mapped_columns) @model = model @payload = payload_to_json_array(payload) @matching_columns = matching_columns @mapped_columns = mapped_columns end |
Instance Attribute Details
#mapped_columns ⇒ Object (readonly)
Returns the value of attribute mapped_columns.
7 8 9 |
# File 'lib/activerecord/mass_insert/statement.rb', line 7 def mapped_columns @mapped_columns end |
#matching_columns ⇒ Object (readonly)
Returns the value of attribute matching_columns.
7 8 9 |
# File 'lib/activerecord/mass_insert/statement.rb', line 7 def matching_columns @matching_columns end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
7 8 9 |
# File 'lib/activerecord/mass_insert/statement.rb', line 7 def model @model end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
7 8 9 |
# File 'lib/activerecord/mass_insert/statement.rb', line 7 def payload @payload end |