Class: Flydata::SourceMysql::QueryEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/flydata/source_mysql/table_ddl.rb

Overview

mimics RubyBinlog::QueryEvent

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_type, database_name, event_table_name, next_position, event_length, query, timestamp) ⇒ QueryEvent

Returns a new instance of QueryEvent.


86
87
88
89
90
91
92
93
94
95
# File 'lib/flydata/source_mysql/table_ddl.rb', line 86

def initialize(event_type, database_name, event_table_name, next_position,
               event_length, query, timestamp)
  @event_type = event_type
  @database_name = database_name
  @event_table_name = event_table_name
  @next_position = next_position
  @event_length = event_length
  @query = query
  @timestamp = timestamp
end

Instance Attribute Details

#database_nameObject (readonly)

Returns the value of attribute database_name


96
97
98
# File 'lib/flydata/source_mysql/table_ddl.rb', line 96

def database_name
  @database_name
end

#event_lengthObject (readonly)

Returns the value of attribute event_length


96
97
98
# File 'lib/flydata/source_mysql/table_ddl.rb', line 96

def event_length
  @event_length
end

#event_table_nameObject (readonly)

Returns the value of attribute event_table_name


96
97
98
# File 'lib/flydata/source_mysql/table_ddl.rb', line 96

def event_table_name
  @event_table_name
end

#event_typeObject (readonly)

Returns the value of attribute event_type


96
97
98
# File 'lib/flydata/source_mysql/table_ddl.rb', line 96

def event_type
  @event_type
end

#next_positionObject (readonly)

Returns the value of attribute next_position


96
97
98
# File 'lib/flydata/source_mysql/table_ddl.rb', line 96

def next_position
  @next_position
end

#queryObject (readonly)

Returns the value of attribute query


96
97
98
# File 'lib/flydata/source_mysql/table_ddl.rb', line 96

def query
  @query
end

#timestampObject (readonly)

Returns the value of attribute timestamp


96
97
98
# File 'lib/flydata/source_mysql/table_ddl.rb', line 96

def timestamp
  @timestamp
end

Instance Method Details

#to_sObject


99
100
101
102
103
# File 'lib/flydata/source_mysql/table_ddl.rb', line 99

def to_s
  <<EOS
event_type;#{event_type} database_name:#{database_name} event_table_name:#{event_table_name} next_position:#{next_position} event_length:#{event_length} timestamp:#{timestamp} query:#{query}
EOS
end