Class: Lhm::Cleanup::Current
- Inherits:
-
Object
- Object
- Lhm::Cleanup::Current
- Defined in:
- lib/lhm/cleanup/current.rb
Constant Summary collapse
- LOG_PREFIX =
"Current"
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#ddls ⇒ Object
readonly
Returns the value of attribute ddls.
-
#run ⇒ Object
readonly
Returns the value of attribute run.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(run, origin_table_name, connection, options = {}) ⇒ Current
constructor
A new instance of Current.
Constructor Details
#initialize(run, origin_table_name, connection, options = {}) ⇒ Current
Returns a new instance of Current.
10 11 12 13 14 15 16 |
# File 'lib/lhm/cleanup/current.rb', line 10 def initialize(run, origin_table_name, connection, ={}) @run = run @table_name = TableName.new(origin_table_name) @connection = connection @ddls = [] @retry_config = [:retriable] || {} end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
18 19 20 |
# File 'lib/lhm/cleanup/current.rb', line 18 def connection @connection end |
#ddls ⇒ Object (readonly)
Returns the value of attribute ddls.
18 19 20 |
# File 'lib/lhm/cleanup/current.rb', line 18 def ddls @ddls end |
#run ⇒ Object (readonly)
Returns the value of attribute run.
18 19 20 |
# File 'lib/lhm/cleanup/current.rb', line 18 def run @run end |
Instance Method Details
#execute ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/lhm/cleanup/current.rb', line 20 def execute build_statements_for_drop_lhm_triggers_for_origin build_statements_for_rename_lhmn_tables_for_origin if run execute_ddls else report_ddls end end |