Class: Flydata::Parser::Mysql::MysqlDumpGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/flydata/parser/mysql/dump_parser.rb

Direct Known Subclasses

MysqlDumpGeneratorNoMasterData

Instance Method Summary collapse

Constructor Details

#initialize(conf) ⇒ MysqlDumpGenerator

Returns a new instance of MysqlDumpGenerator.



43
44
45
46
# File 'lib/flydata/parser/mysql/dump_parser.rb', line 43

def initialize(conf)
  @dump_cmd = generate_dump_cmd(conf)
  @db_opts = [:host, :port, :username, :password, :database].inject({}) {|h, sym| h[sym] = conf[sym.to_s]; h}
end

Instance Method Details

#dump(file_path) ⇒ Object



47
48
49
# File 'lib/flydata/parser/mysql/dump_parser.rb', line 47

def dump(file_path)
  raise "subclass must implement the method"
end

#generate_dump_cmd(conf) ⇒ Object



51
52
53
# File 'lib/flydata/parser/mysql/dump_parser.rb', line 51

def generate_dump_cmd(conf)
  raise "subclass must implement the method"
end