Sha256: 605400b7c65eba351aa0fdca14c9c49d881ba1b075ca28235fd0e564445a8e0e

Contents?: true

Size: 1.76 KB

Versions: 45

Compression:

Stored size: 1.76 KB

Contents

require 'flydata/source'
require 'flydata/source/component'
require 'flydata/source/errors'

module Flydata
module Source

class ParseDumpAndSend < Component
  def self.inherited(child_class)
    Source.register(child_class, self)
  end

  # 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.
  def value_converters
    raise UnsupportedSourceError,  "subclass must implement"
  end

  # 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
  def parse_dump(dump_pos_info, dmpio, create_table_block, insert_record_block, check_point_block)
    raise UnsupportedSourceError,  "subclass must implement"
  end
end

end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
flydata-0.8.10.2 lib/flydata/source/parse_dump_and_send.rb
flydata-0.8.10.1 lib/flydata/source/parse_dump_and_send.rb
flydata-0.8.9.11 lib/flydata/source/parse_dump_and_send.rb
flydata-0.8.10 lib/flydata/source/parse_dump_and_send.rb
flydata-0.8.9 lib/flydata/source/parse_dump_and_send.rb
flydata-0.8.8 lib/flydata/source/parse_dump_and_send.rb
flydata-0.8.7 lib/flydata/source/parse_dump_and_send.rb
flydata-0.8.6 lib/flydata/source/parse_dump_and_send.rb
flydata-0.8.5 lib/flydata/source/parse_dump_and_send.rb
flydata-0.8.4 lib/flydata/source/parse_dump_and_send.rb
flydata-0.8.3 lib/flydata/source/parse_dump_and_send.rb
flydata-0.8.2 lib/flydata/source/parse_dump_and_send.rb
flydata-0.8.1 lib/flydata/source/parse_dump_and_send.rb
flydata-0.8.0 lib/flydata/source/parse_dump_and_send.rb
flydata-0.7.19 lib/flydata/source/parse_dump_and_send.rb
flydata-0.7.18 lib/flydata/source/parse_dump_and_send.rb
flydata-0.7.17 lib/flydata/source/parse_dump_and_send.rb
flydata-0.7.16 lib/flydata/source/parse_dump_and_send.rb
flydata-0.7.15 lib/flydata/source/parse_dump_and_send.rb
flydata-0.7.14 lib/flydata/source/parse_dump_and_send.rb