Module: Oboe::Inst::ConnectionAdapters::FlavorInitializers
- Defined in:
- lib/oboe/frameworks/rails/inst/active_record.rb
Overview
Mysql2Adapter
Class Method Summary collapse
Class Method Details
.mysql ⇒ Object
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/oboe/frameworks/rails/inst/active_record.rb', line 235 def self.mysql if ActiveRecord::Base::connection.adapter_name.downcase.to_sym == :mysql puts "[oboe/loading] Instrumenting ActiveRecord MysqlAdapter" if Oboe::Config[:verbose] if ::Rails::VERSION::MAJOR == 3 and ::Rails::VERSION::MINOR > 1 ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter.module_eval do include Oboe::Inst::ConnectionAdapters::AbstractMysqlAdapter end ActiveRecord::ConnectionAdapters::MysqlAdapter.module_eval do include Oboe::Inst::ConnectionAdapters::MysqlAdapter end else ActiveRecord::ConnectionAdapters::MysqlAdapter.module_eval do include Oboe::Inst::ConnectionAdapters::LegacyMysqlAdapter end end end end |
.mysql2 ⇒ Object
253 254 255 256 257 258 259 260 |
# File 'lib/oboe/frameworks/rails/inst/active_record.rb', line 253 def self.mysql2 if ActiveRecord::Base::connection.adapter_name.downcase.to_sym == :mysql2 puts "[oboe/loading] Instrumenting ActiveRecord Mysql2Adapter" if Oboe::Config[:verbose] ActiveRecord::ConnectionAdapters::Mysql2Adapter.module_eval do include Oboe::Inst::ConnectionAdapters::Mysql2Adapter end end end |
.oracle ⇒ Object
275 276 277 278 279 280 281 282 |
# File 'lib/oboe/frameworks/rails/inst/active_record.rb', line 275 def self.oracle if ActiveRecord::Base::connection.adapter_name.downcase.to_sym == :oracleenhanced puts "[oboe/loading] Instrumenting ActiveRecord OracleEnhancedAdapter" if Oboe::Config[:verbose] ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.module_eval do include Oboe::Inst::ConnectionAdapters end end end |
.postgresql ⇒ Object
262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/oboe/frameworks/rails/inst/active_record.rb', line 262 def self.postgresql if ActiveRecord::Base::connection.adapter_name.downcase.to_sym == :postgresql puts "[oboe/loading] Instrumenting ActiveRecord PostgreSQLAdapter" if Oboe::Config[:verbose] ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.module_eval do if ::Rails::VERSION::MAJOR == 3 and ::Rails::VERSION::MINOR > 0 include Oboe::Inst::ConnectionAdapters::PostgreSQLAdapter else include Oboe::Inst::ConnectionAdapters::LegacyPostgreSQLAdapter end end end end |