Sha256: 8e4acab9be0b276815e016eb6d541b60c81aaec6458a2db0616b2149473bfd5e

Contents?: true

Size: 479 Bytes

Versions: 6

Compression:

Stored size: 479 Bytes

Contents

require 'flydata/parser_provider'
require 'flydata/fluent-plugins/mysql/ddl_query_handler'

module Mysql
  class TruncateTableQueryHandler < TableDdlQueryHandler
    PATTERN = /^TRUNCATE/i

    def initialize(context)
      super
    end

    def pattern
      PATTERN
    end

    def process(record)
      emit_record(:truncate_table, record) do |opt|
        {
          table_name: record['table_name'],
          query: record["query"]
        }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
flydata-0.6.3 lib/flydata/fluent-plugins/mysql/truncate_table_query_handler.rb
flydata-0.6.2 lib/flydata/fluent-plugins/mysql/truncate_table_query_handler.rb
flydata-0.6.1 lib/flydata/fluent-plugins/mysql/truncate_table_query_handler.rb
flydata-0.6.0 lib/flydata/fluent-plugins/mysql/truncate_table_query_handler.rb
flydata-0.5.21 lib/flydata/fluent-plugins/mysql/truncate_table_query_handler.rb
flydata-0.5.20 lib/flydata/fluent-plugins/mysql/truncate_table_query_handler.rb