Class: GroongaDelta::ImportStatus::MySQL
- Inherits:
-
Object
- Object
- GroongaDelta::ImportStatus::MySQL
- Defined in:
- lib/groonga-delta/import-status.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(status) ⇒ MySQL
constructor
A new instance of MySQL.
- #last_file ⇒ Object
- #last_position ⇒ Object
- #last_table_map_file ⇒ Object
- #last_table_map_position ⇒ Object
- #update(new_data) ⇒ Object
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_file ⇒ Object
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_position ⇒ Object
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_file ⇒ Object
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_position ⇒ Object
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 |