Class: HasHelpers::DN::Processor
- Inherits:
-
Object
- Object
- HasHelpers::DN::Processor
- Includes:
- Utils::QueryUtils
- Defined in:
- app/lib/has_helpers/dn/processor.rb
Constant Summary collapse
- MAX_PROCESSING_TIME =
5.minutes
Instance Attribute Summary collapse
-
#change_log_id ⇒ Object
readonly
Returns the value of attribute change_log_id.
-
#changes ⇒ Object
readonly
Returns the value of attribute changes.
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#columns_and_tables_to_update ⇒ Object
readonly
Returns the value of attribute columns_and_tables_to_update.
-
#record_id ⇒ Object
readonly
Returns the value of attribute record_id.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Instance Method Summary collapse
-
#initialize(table_name, columns_and_tables_to_update, class_name, record_id, changes, change_log_id) ⇒ Processor
constructor
A new instance of Processor.
- #process ⇒ Object
Methods included from Utils::QueryUtils
#fetch_update_info, #update_assoc, #update_intermediate_of_many_to_many, #update_many_to_many, #update_many_to_one, #update_one_to_many, #update_one_to_one, #update_sql, #update_table
Constructor Details
#initialize(table_name, columns_and_tables_to_update, class_name, record_id, changes, change_log_id) ⇒ Processor
Returns a new instance of Processor.
11 12 13 14 15 16 17 18 |
# File 'app/lib/has_helpers/dn/processor.rb', line 11 def initialize(table_name, columns_and_tables_to_update, class_name, record_id, changes, change_log_id) @table_name = table_name @changes = changes @columns_and_tables_to_update = columns_and_tables_to_update @record_id = record_id @class_name = class_name.constantize @change_log_id = change_log_id end |
Instance Attribute Details
#change_log_id ⇒ Object (readonly)
Returns the value of attribute change_log_id.
9 10 11 |
# File 'app/lib/has_helpers/dn/processor.rb', line 9 def change_log_id @change_log_id end |
#changes ⇒ Object (readonly)
Returns the value of attribute changes.
9 10 11 |
# File 'app/lib/has_helpers/dn/processor.rb', line 9 def changes @changes end |
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
9 10 11 |
# File 'app/lib/has_helpers/dn/processor.rb', line 9 def class_name @class_name end |
#columns_and_tables_to_update ⇒ Object (readonly)
Returns the value of attribute columns_and_tables_to_update.
9 10 11 |
# File 'app/lib/has_helpers/dn/processor.rb', line 9 def columns_and_tables_to_update @columns_and_tables_to_update end |
#record_id ⇒ Object (readonly)
Returns the value of attribute record_id.
9 10 11 |
# File 'app/lib/has_helpers/dn/processor.rb', line 9 def record_id @record_id end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
9 10 11 |
# File 'app/lib/has_helpers/dn/processor.rb', line 9 def table_name @table_name end |
Instance Method Details
#process ⇒ Object
20 21 22 |
# File 'app/lib/has_helpers/dn/processor.rb', line 20 def process process_upsert end |