Sha256: 5d3e1cfc08a7d93e3c9e70558df1c18afe51026afa7140f06ff4d711b625bf60

Contents?: true

Size: 687 Bytes

Versions: 15

Compression:

Stored size: 687 Bytes

Contents

require 'flydata/plugin_support/context'
require 'flydata-core/mysql/binlog_pos'

module Flydata
module SourceMysql
module PluginSupport

  class Context < ::Flydata::PluginSupport::Context
    register_mandatory_opts :database

    def initialize(opts)
      super
      set_table_binlog_pos
    end

    attr_reader :table_binlog_pos

    def set_table_binlog_pos
      @table_binlog_pos = {}
      tables.each do |table_name|
        table_binlog_pos_str = sync_fm.get_table_source_raw_pos(table_name)
        if table_binlog_pos_str
          @table_binlog_pos[table_name] = ::FlydataCore::Mysql::BinlogPos.load(table_binlog_pos_str)
        end
      end
    end
  end

end
end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
flydata-0.7.14 lib/flydata/source_mysql/plugin_support/context.rb
flydata-0.7.13 lib/flydata/source_mysql/plugin_support/context.rb
flydata-0.7.12 lib/flydata/source_mysql/plugin_support/context.rb
flydata-0.7.11 lib/flydata/source_mysql/plugin_support/context.rb
flydata-0.7.10 lib/flydata/source_mysql/plugin_support/context.rb
flydata-0.7.9 lib/flydata/source_mysql/plugin_support/context.rb
flydata-0.7.8 lib/flydata/source_mysql/plugin_support/context.rb
flydata-0.7.7 lib/flydata/source_mysql/plugin_support/context.rb
flydata-0.7.6 lib/flydata/source_mysql/plugin_support/context.rb
flydata-0.7.5 lib/flydata/source_mysql/plugin_support/context.rb
flydata-0.7.4 lib/flydata/source_mysql/plugin_support/context.rb
flydata-0.7.2.1 lib/flydata/source_mysql/plugin_support/context.rb
flydata-0.7.2 lib/flydata/source_mysql/plugin_support/context.rb
flydata-0.7.1 lib/flydata/source_mysql/plugin_support/context.rb
flydata-0.7.0 lib/flydata/source_mysql/plugin_support/context.rb