Class: PerconaAr::PtOnlineSchemaChangeExecutor
- Inherits:
-
Object
- Object
- PerconaAr::PtOnlineSchemaChangeExecutor
- Includes:
- FileUtils
- Defined in:
- lib/percona_ar/pt_online_schema_change_executor.rb
Instance Attribute Summary collapse
-
#sql ⇒ Object
Returns the value of attribute sql.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(sql) ⇒ PtOnlineSchemaChangeExecutor
constructor
A new instance of PtOnlineSchemaChangeExecutor.
Constructor Details
#initialize(sql) ⇒ PtOnlineSchemaChangeExecutor
9 10 11 |
# File 'lib/percona_ar/pt_online_schema_change_executor.rb', line 9 def initialize(sql) @sql = sql end |
Instance Attribute Details
#sql ⇒ Object
Returns the value of attribute sql.
7 8 9 |
# File 'lib/percona_ar/pt_online_schema_change_executor.rb', line 7 def sql @sql end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 |
# File 'lib/percona_ar/pt_online_schema_change_executor.rb', line 13 def call if sql =~ /^ALTER TABLE `([^`]*)` (.*)/i sh "#{boilerplate}#{suffix($1, $2)}" end end |