Sha256: 393d64f8a9aef686a482d6cf5bcc4fc8f49b7ce89f6bf573836febb1cac5a031

Contents?: true

Size: 413 Bytes

Versions: 36

Compression:

Stored size: 413 Bytes

Contents

module Flydata
module Mysql
  class BinLogPosition
    include Comparable
    attr_accessor :file, :pos

    def initialize(binlog_content)
      items = binlog_content.split("\t")
      @file = items[0]
      @pos = items[1].to_i
    end

    def <=>(obj)
      (self.file <=> obj.file) == 0 ? (self.pos <=> obj.pos) : (self.file <=> obj.file)
    end

    def to_s
      "#{file}\t#{pos}"
    end
  end
end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
flydata-0.6.3 lib/flydata/mysql/binlog_position.rb
flydata-0.6.2 lib/flydata/mysql/binlog_position.rb
flydata-0.6.1 lib/flydata/mysql/binlog_position.rb
flydata-0.6.0 lib/flydata/mysql/binlog_position.rb
flydata-0.5.21 lib/flydata/mysql/binlog_position.rb
flydata-0.5.20 lib/flydata/mysql/binlog_position.rb
flydata-0.5.17 lib/flydata/mysql/binlog_position.rb
flydata-0.5.16 lib/flydata/mysql/binlog_position.rb
flydata-0.5.15 lib/flydata/mysql/binlog_position.rb
flydata-0.5.14 lib/flydata/mysql/binlog_position.rb
flydata-0.5.13 lib/flydata/mysql/binlog_position.rb
flydata-0.5.12 lib/flydata/mysql/binlog_position.rb
flydata-0.5.11 lib/flydata/mysql/binlog_position.rb
flydata-0.5.10 lib/flydata/mysql/binlog_position.rb
flydata-0.5.9 lib/flydata/mysql/binlog_position.rb
flydata-0.5.8 lib/flydata/mysql/binlog_position.rb
flydata-0.5.7 lib/flydata/mysql/binlog_position.rb
flydata-0.5.6 lib/flydata/mysql/binlog_position.rb
flydata-0.5.5 lib/flydata/mysql/binlog_position.rb
flydata-0.5.4 lib/flydata/mysql/binlog_position.rb