Class: Flydata::SourceMysql::PluginSupport::DatabaseDdlQueryHandler
- Inherits:
-
DdlQueryHandler
- Object
- BinlogRecordHandler
- BinlogQueryHandler
- DdlQueryHandler
- Flydata::SourceMysql::PluginSupport::DatabaseDdlQueryHandler
- Defined in:
- lib/flydata/source_mysql/plugin_support/ddl_query_handler.rb
Direct Known Subclasses
Constant Summary
Constants inherited from DdlQueryHandler
Flydata::SourceMysql::PluginSupport::DdlQueryHandler::DDL_TABLE_QUERY
Constants included from PluginSupport::SyncRecordEmittable
PluginSupport::SyncRecordEmittable::RESPECT_ORDER, PluginSupport::SyncRecordEmittable::SEQ, PluginSupport::SyncRecordEmittable::SRC_POS, PluginSupport::SyncRecordEmittable::TABLE_NAME, PluginSupport::SyncRecordEmittable::TABLE_REV, PluginSupport::SyncRecordEmittable::TYPE, PluginSupport::SyncRecordEmittable::V
Instance Attribute Summary
Attributes included from PluginSupport::SyncRecordEmittable
Instance Method Summary collapse
Methods inherited from DdlQueryHandler
Methods inherited from BinlogQueryHandler
Methods inherited from BinlogRecordHandler
Methods included from PluginSupport::SyncRecordEmittable
Constructor Details
This class inherits a constructor from Flydata::SourceMysql::PluginSupport::BinlogRecordHandler
Instance Method Details
#emit_record(type, record) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/flydata/source_mysql/plugin_support/ddl_query_handler.rb', line 43 def emit_record(type, record) return unless acceptable_db?(record) check_empty_binlog opt = {} records = yield(opt) # The block may set options as necessary return if records.nil? # skip records = [records] unless records.kind_of?(Array) return unless acceptable_event?(type) emit_sync_records(records, opt.merge( timestamp: record["timestamp"].to_i, type: type, src_pos: binlog_pos(record))) end |