Sha256: de6b57fc8236f04d4a25fce46e2f1e01588dc57a931928feb40b7f8e30ce9f6e
Contents?: true
Size: 608 Bytes
Versions: 21
Compression:
Stored size: 608 Bytes
Contents
require 'flydata/source_mysql/mysql_accessible' module Flydata module SourceMysql class SyncDatabaseSizeCheck include MysqlAccessible SIZE_CHECK_QUERY = <<EOT SELECT SUM(data_length) bytesize FROM information_schema.tables WHERE table_schema = '%s' AND table_name in (%s); EOT def initialize(de_conf) super @query = SIZE_CHECK_QUERY % [ de_conf['database'], tables = de_conf['tables'].collect{|t| "'#{t}'"}.join(',')] end def get_db_bytesize exec_mysql_query(@query).first['bytesize'].to_i end end end end
Version data entries
21 entries across 21 versions & 1 rubygems
Version | Path |
---|---|
flydata-0.7.13 | lib/flydata/source_mysql/sync_database_size_check.rb |