Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Defined in:
- lib/active_record/connection_adapters/clickhouse_adapter.rb
Class Method Summary collapse
-
.clickhouse_connection(config) ⇒ Object
Establishes a connection to the database that’s used by all Active Record objects.
Class Method Details
.clickhouse_connection(config) ⇒ Object
Establishes a connection to the database that’s used by all Active Record objects
27 28 29 30 31 32 33 34 35 |
# File 'lib/active_record/connection_adapters/clickhouse_adapter.rb', line 27 def clickhouse_connection(config) config = config.symbolize_keys unless config.key?(:database) raise ArgumentError, 'No database specified. Missing argument: database.' end ConnectionAdapters::ClickhouseAdapter.new(config) end |