Class: Flydata::Source::ParseDumpAndSend
- Defined in:
- lib/flydata/source/parse_dump_and_send.rb
Direct Known Subclasses
Flydata::SourceMysql::ParseDumpAndSend, Flydata::SourceOracle::ParseDumpAndSend, Flydata::SourcePostgresql::ParseDumpAndSend
Class Method Summary collapse
Instance Method Summary collapse
-
#parse_dump(dump_pos_info, dmpio, create_table_block, insert_record_block, check_point_block) ⇒ Object
Public Interface: Parse Dump.
-
#value_converters ⇒ Object
Public Interface: Value Converters.
Methods inherited from Component
Constructor Details
This class inherits a constructor from Flydata::Source::Component
Class Method Details
Instance Method Details
#parse_dump(dump_pos_info, dmpio, create_table_block, insert_record_block, check_point_block) ⇒ Object
Public Interface: Parse Dump
dump_pos_info: A hash containing the dump position from where the parse
starts
dmpio: A read IO object to the dump create_table_block: A callback called with a table info before its data gets
sent
callback parameters:
source_table: A SourceTable object
insert_record_block: A callback called with parsed records
callback parameters:
source_table: A SourceTable object
values_set: An array of arrays. Each array has values for a row.
check_point_block: A callback called between transactions. Dump position
gets saved for resume at this timing.
callback_parameters:
source_table: A SourceTable object
last_pos: An IO location as of the check point
bytesize: Number of bytes which have been processed
source_pos: Source position of the dump
state: Current dump state
substate: Current dump sub-state
Returns none
46 47 48 |
# File 'lib/flydata/source/parse_dump_and_send.rb', line 46 def parse_dump(dump_pos_info, dmpio, create_table_block, insert_record_block, check_point_block) raise UnsupportedSourceError, "subclass must implement" end |
#value_converters ⇒ Object
Public Interface: Value Converters
Returns a hash of value converters which convert source values to FlyData values. Hash key is a data type for which the converter is called. A conveter takes a source value and returns a converted value.
18 19 20 |
# File 'lib/flydata/source/parse_dump_and_send.rb', line 18 def value_converters raise UnsupportedSourceError, "subclass must implement" end |