Sha256: 6ddbf17d66fbbc24865ae46641341ae2190824af535488265377678ac0ab9f2d

Contents?: true

Size: 739 Bytes

Versions: 29

Compression:

Stored size: 739 Bytes

Contents

require 'flydata/parser/parser_provider'
require 'flydata/source_mysql/plugin_support/ddl_query_handler'

module Flydata
module SourceMysql

module PluginSupport
  class UnsupportedQueryHandler < TableDdlQueryHandler
    PATTERN = /.*/  # Catch all ddl

    def initialize(context)
      super
    end

    def pattern
      PATTERN
    end

    def process(record)
      query = record['normalized_query']
      if acceptable_db?(record) && should_log?(query)
        $log.info({ type: :unsupported_query, query: query.to_s.strip}.to_s + " at \"#{binlog_pos(record)}\"")
      end
    end

    def should_log?(query)
      return false if query.to_s.empty?
      @context.tables.any?{|tbl| query.include?(tbl)}
    end
  end
end

end
end

Version data entries

29 entries across 29 versions & 1 rubygems

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