Sha256: 7783d29f8b0ea933aada5aa0f1e70081492c27b0411aa3072130e7983f6330c0

Contents?: true

Size: 1.04 KB

Versions: 43

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 && ::ActiveRecord::VERSION::MINOR > 0) ||
                ::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

43 entries across 43 versions & 1 rubygems

Version Path
oboe-2.7.19-java lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.19 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.18-java lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.18 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.17.1-java lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.17.1 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.16.1 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.16.1-java lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.15.1-java lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.15.1 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.14.1-java lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.14.1 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.13.3-java lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.13.3 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.12.1-java lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.12.1 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.11.1 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.11.1-java lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.10.1-java lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb
oboe-2.7.10.1 lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb