Sha256: ada71b18899dbc062b542dd606bc6e3269f56cf37b0d3eca1b5e72894db9c71c

Contents?: true

Size: 683 Bytes

Versions: 17

Compression:

Stored size: 683 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 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

17 entries across 17 versions & 1 rubygems

Version Path
activerecord-sqlserver-adapter-5.2.1 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.2.0 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.2.0.rc2 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.2.0.rc1 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.1.6 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.0.8 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.1.5 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.1.2 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.1.1 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.1.0 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.0.7 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.0.6 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.0.5 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.0.4 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.0.3 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.0.1 test/support/connection_reflection.rb
activerecord-sqlserver-adapter-5.0.0 test/support/connection_reflection.rb