Module: ActiveRecord::ConnectionHandling
- Defined in:
- lib/active_record/connection_adapters/mysql2rgeo_adapter.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#mysql2rgeo_connection(config) ⇒ Object
Establishes a connection to the database that’s used by all Active Record objects.
Instance Method Details
#mysql2rgeo_connection(config) ⇒ Object
Establishes a connection to the database that’s used by all Active Record objects.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/active_record/connection_adapters/mysql2rgeo_adapter.rb', line 28 def mysql2rgeo_connection(config) config = config.symbolize_keys config[:flags] ||= 0 if config[:flags].kind_of? Array config[:flags].push "FOUND_ROWS" else config[:flags] |= Mysql2::Client::FOUND_ROWS end ConnectionAdapters::Mysql2RgeoAdapter.new( ConnectionAdapters::Mysql2RgeoAdapter.new_client(config), logger, nil, config, ) end |