Class: GroongaDelta::ImportStatus::MySQL

Inherits:
Object
  • Object
show all
Defined in:
lib/groonga-delta/import-status.rb

Instance Method Summary collapse

Constructor Details

#initialize(status) ⇒ MySQL

Returns a new instance of MySQL.



29
30
31
# File 'lib/groonga-delta/import-status.rb', line 29

def initialize(status)
  @status = status
end

Instance Method Details

#[](key) ⇒ Object



33
34
35
# File 'lib/groonga-delta/import-status.rb', line 33

def [](key)
  (@status["mysql"] || {})[key]
end

#last_fileObject



41
42
43
# File 'lib/groonga-delta/import-status.rb', line 41

def last_file
  self["last_file"] || self["file"] # For backward compatibility
end

#last_positionObject



45
46
47
# File 'lib/groonga-delta/import-status.rb', line 45

def last_position
  self["last_position"] || self["position"] # For backward compatibility
end

#last_table_map_fileObject



49
50
51
# File 'lib/groonga-delta/import-status.rb', line 49

def last_table_map_file
  self["last_table_map_file"] || self["file"]
end

#last_table_map_positionObject



53
54
55
# File 'lib/groonga-delta/import-status.rb', line 53

def last_table_map_position
  self["last_table_map_position"]
end

#update(new_data) ⇒ Object



37
38
39
# File 'lib/groonga-delta/import-status.rb', line 37

def update(new_data)
  @status.update("mysql" => new_data)
end