Class: Flydata::SourceMysql::SyncGenerateTableDdl

Inherits:
Flydata::Source::SyncGenerateTableDdl show all
Defined in:
lib/flydata/source_mysql/sync_generate_table_ddl.rb

Instance Attribute Summary

Attributes inherited from Flydata::Source::SyncGenerateTableDdl

#dp

Instance Method Summary collapse

Methods inherited from Flydata::Source::SyncGenerateTableDdl

#generate_flydata_tabledef, inherited, #initialize

Methods inherited from Flydata::Source::Component

#initialize

Constructor Details

This class inherits a constructor from Flydata::Source::SyncGenerateTableDdl

Instance Method Details

#run_compatibility_checkObject



9
10
11
12
13
14
15
16
17
# File 'lib/flydata/source_mysql/sync_generate_table_ddl.rb', line 9

def run_compatibility_check
  MysqlCompatibilityCheck.new(dp, de['mysql_data_entry_preference']).check
  if `which mysqldump`.empty?
    raise "mysqldump is not installed.  mysqldump is required to run the command"
  end
  %w(host username database).each do |conf_name|
    raise "MySQL `#{conf_name}` is neither defined in the data entry nor the local config file" if de['mysql_data_entry_preference'][conf_name].to_s.empty?
  end
end