Class: ClickhouseActiverecord::SchemaDumper

Inherits:
ActiveRecord::ConnectionAdapters::SchemaDumper
  • Object
show all
Defined in:
lib/clickhouse-activerecord/schema_dumper.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#simpleObject

Returns the value of attribute simple.



4
5
6
# File 'lib/clickhouse-activerecord/schema_dumper.rb', line 4

def simple
  @simple
end

Class Method Details

.dump(connection = ActiveRecord::Base.connection, stream = STDOUT, config = ActiveRecord::Base, default = false) ⇒ Object



7
8
9
10
11
12
# File 'lib/clickhouse-activerecord/schema_dumper.rb', line 7

def dump(connection = ActiveRecord::Base.connection, stream = STDOUT, config = ActiveRecord::Base, default = false)
  dumper = connection.create_schema_dumper(generate_options(config))
  dumper.simple = default
  dumper.dump(stream)
  stream
end