Sha256: 5b572d081f7c12fdb0ad6d8cfe3bc49249b118df618c66b1b65b95d72b145934

Contents?: true

Size: 628 Bytes

Versions: 1

Compression:

Stored size: 628 Bytes

Contents

require 'trinidad_dbpool/webapp_extension'

module Trinidad
  module Extensions
    class MssqlDbpoolWebAppExtension < DbpoolWebAppExtension

      def driver_name
        defined?(Jdbc::JTDS.driver_name) ? Jdbc::JTDS.driver_name :
          'net.sourceforge.jtds.jdbc.Driver'
      end

      def protocol
        'jdbc:jtds:sqlserver://'
      end

      def load_driver
        require 'jdbc/jtds'
        # NOTE: the adapter has only support for working with the
        # open-source jTDS driver (won't work with MS's driver) !
        Jdbc::JTDS.load_driver if defined?(Jdbc::JTDS.load_driver)
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
trinidad_mssql_dbpool_extension-0.8.0 lib/trinidad_mssql_dbpool_extension/mssql_webapp_extension.rb