Class: ClickhouseRuby::ActiveRecord::TableOptionsExtractor

Inherits:
Object
  • Object
show all
Defined in:
lib/clickhouse_ruby/active_record/schema_dumper.rb

Overview

Extracts ClickHouse-specific table options

Instance Method Summary collapse

Constructor Details

#initialize(connection, table_name) ⇒ TableOptionsExtractor

Returns a new instance of TableOptionsExtractor.



228
229
230
231
# File 'lib/clickhouse_ruby/active_record/schema_dumper.rb', line 228

def initialize(connection, table_name)
  @connection = connection
  @table_name = table_name
end

Instance Method Details

#extractHash

Extract table options from system.tables

Returns:

  • (Hash)

    table options



236
237
238
239
240
241
# File 'lib/clickhouse_ruby/active_record/schema_dumper.rb', line 236

def extract
  row = 
  return {} unless row

  build_options(row)
end