Sha256: 05cd794cd5b61e298d93514241e752fad0c24706192e867edd07ba6bfc6c7f93

Contents?: true

Size: 729 Bytes

Versions: 6

Compression:

Stored size: 729 Bytes

Contents

module ARTest
  module SQLServer
    module ConnectionReflection

      extend ActiveSupport::Concern

      included { extend ConnectionReflection }

      def connection
        ActiveRecord::Base.connection
      end

      def connection_options
        connection.instance_variable_get :@connection_options
      end

      def connection_dblib?
        connection_options[:mode] == :dblib
      end

      def connection_dblib_73?
        return true if defined? JRUBY_VERSION
        return false unless connection_dblib?
        rc = connection.raw_connection
        rc.respond_to?(:tds_73?) && rc.tds_73?
      end

      def connection_sqlserver_azure?
        connection.sqlserver_azure?
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
activerecord-jdbcsqlserver-adapter-52.0.0 test/support/connection_reflection.rb
activerecord-jdbcsqlserver-adapter-51.1.0 test/support/connection_reflection.rb
activerecord-jdbcsqlserver-adapter-50.1.0 test/support/connection_reflection.rb
activerecord-jdbcsqlserver-adapter-51.0.1 test/support/connection_reflection.rb
activerecord-jdbcsqlserver-adapter-51.0.0 test/support/connection_reflection.rb
activerecord-jdbcsqlserver-adapter-50.0.0 test/support/connection_reflection.rb