Sha256: 283f888f231760547d5291da8223f46c81beadd66c918c1fb3c1bf64320ac908

Contents?: true

Size: 756 Bytes

Versions: 17

Compression:

Stored size: 756 Bytes

Contents

require 'flydata/source/sync'

module Flydata
module SourceMysql

class Sync < Source::Sync
  def setup
    mp = de['mysql_data_entry_preference']

    setup_table_prefs(mp)

    unless mp['ssl_ca_content'].to_s.strip.empty?
      sync_fm = SyncFileManager.new(de)
      sync_fm.save_ssl_ca(mp['ssl_ca_content'])
      mp['ssl_ca'] = sync_fm.ssl_ca_path
      mp['sslca'] = mp['ssl_ca']
    end
  end

  def supported?
    true
  end

  def table_lists
    de['mysql_data_entry_preference'].select {|key, value| %w(tables new_tables invalid_tables tables_append_only).include?(key)}
  end

  def data_servers
    de['mysql_data_entry_preference']['data_servers']
  end

  def forwarder
    de['mysql_data_entry_preference']['forwarder']
  end
end

end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
flydata-0.7.6 lib/flydata/source_mysql/sync.rb
flydata-0.7.5 lib/flydata/source_mysql/sync.rb
flydata-0.7.4 lib/flydata/source_mysql/sync.rb
flydata-0.7.2.1 lib/flydata/source_mysql/sync.rb
flydata-0.7.2 lib/flydata/source_mysql/sync.rb
flydata-0.7.1 lib/flydata/source_mysql/sync.rb
flydata-0.7.0 lib/flydata/source_mysql/sync.rb
flydata-0.6.14 lib/flydata/source_mysql/sync.rb
flydata-0.6.13 lib/flydata/source_mysql/sync.rb
flydata-0.6.12 lib/flydata/source_mysql/sync.rb
flydata-0.6.11 lib/flydata/source_mysql/sync.rb
flydata-0.6.10 lib/flydata/source_mysql/sync.rb
flydata-0.6.9 lib/flydata/source_mysql/sync.rb
flydata-0.6.8 lib/flydata/source_mysql/sync.rb
flydata-0.6.7 lib/flydata/source_mysql/sync.rb
flydata-0.6.6 lib/flydata/source_mysql/sync.rb
flydata-0.6.5 lib/flydata/source_mysql/sync.rb