Class: Mysql::DmlRecordHandler

Inherits:
BinlogRecordHandler show all
Defined in:
lib/flydata/fluent-plugins/mysql/dml_record_handler.rb

Constant Summary collapse

ROW =
:row
OLD =
:old
INTEGER_TYPES =
{'TINY' => 1,
                 'SHORT' => 2,
                 'INT24' => 3,
                 'LONG' => 4,
                 'LONGLONG' => 8
}
SIGNLESS_INTEGER_PREFIX =
'0SL'

Constants inherited from BinlogRecordHandler

BinlogRecordHandler::RESPECT_ORDER, BinlogRecordHandler::SEQ, BinlogRecordHandler::SRC_POS, BinlogRecordHandler::TABLE_NAME, BinlogRecordHandler::TABLE_REV, BinlogRecordHandler::TYPE, BinlogRecordHandler::V

Instance Method Summary collapse

Methods inherited from BinlogRecordHandler

#initialize

Constructor Details

This class inherits a constructor from Mysql::BinlogRecordHandler

Instance Method Details

#process(record, type) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/flydata/fluent-plugins/mysql/dml_record_handler.rb', line 15

def process(record, type)
  case type
  when :write_rows
    emit_insert(record)
  when :delete_rows
    emit_delete(record)
  when :update_rows
    emit_update(record)
  else
    raise "Invalid type:#{type}"
  end
end