Sha256: 83aa7c8fdd4a443d79fcca8d30da4591aebbcc842bc0d99fe95e35f9644dcf7e

Contents?: true

Size: 713 Bytes

Versions: 21

Compression:

Stored size: 713 Bytes

Contents

# frozen_string_literal: true

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 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

21 entries across 21 versions & 1 rubygems

Version Path
activerecord-sqlserver-adapter-7.0.7 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-7.0.6 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-7.0.5.1 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-7.0.5.0 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-7.0.4.0 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-7.0.3.0 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-6.0.3 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-7.0.2.0 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-6.1.3.0 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-7.0.1.0 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-7.0.0.0 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-7.0.0.0.rc1 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-6.1.2.1 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-6.1.2.0 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-6.1.1.0 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-6.1.0.0 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-6.1.0.0.rc1 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-6.0.2 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-6.0.1 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-6.0.0 test/support/connection_reflection.rb