Sha256: 0ef1b8e7677e63d75242b238f19745ed7c9ea2c2b1f75f433de61cc26202e54d

Contents?: true

Size: 1.04 KB

Versions: 12

Compression:

Stored size: 1.04 KB

Contents

# Copyright (c) 2013 AppNeta, Inc.
# All rights reserved.

module Oboe
  module Inst
    module ConnectionAdapters
      module FlavorInitializers
        def self.postgresql

          Oboe.logger.info "[oboe/loading] Instrumenting activerecord postgresqladapter" if Oboe::Config[:verbose]

          Oboe::Util.send_include(::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter,
                                    Oboe::Inst::ConnectionAdapters::Utils)

          if (::ActiveRecord::VERSION::MAJOR == 3 and ::ActiveRecord::VERSION::MINOR > 0) or 
                ::ActiveRecord::VERSION::MAJOR == 4

            # ActiveRecord 3.1 and up
            Oboe::Util.method_alias(::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter, :exec_query)
            Oboe::Util.method_alias(::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter, :exec_delete)

          else
            # ActiveRecord 3.0 and prior
            Oboe::Util.method_alias(::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter, :execute)
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
oboe-2.6.6.1 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.6.5.5 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.6.4.1 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.6.3.0 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.6.2.0 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.6.1.0 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.6.0.2 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.5.0.7 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.4.0.1 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.3.4.1 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.3.3.7 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.3.2 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb