Sha256: fdc2925055d7f0d8956f4c62f2ea9279b1cba25be7f49dc53a7d33da4c9b3d57

Contents?: true

Size: 717 Bytes

Versions: 1

Compression:

Stored size: 717 Bytes

Contents

warn "Jdbc-JTDS is only for use with JRuby" if (JRUBY_VERSION.nil? rescue true)

module Jdbc
  module JTDS
    DRIVER_VERSION = '1.2.7'
    VERSION = DRIVER_VERSION

    def self.driver_jar
      "jtds-#{DRIVER_VERSION}.jar"
    end

    def self.load_driver(method = :load)
      send method, driver_jar
    end

    def self.driver_name
      'net.sourceforge.jtds.jdbc.Driver'
    end

    if defined?(JRUBY_VERSION) && # enable backwards-compat behavior :
      ( Java::JavaLang::Boolean.get_boolean("jdbc.driver.autoload") || 
        Java::JavaLang::Boolean.get_boolean("jdbc.jtds.autoload") )
      warn "autoloading JDBC driver on require 'jdbc/jtds'" if $VERBOSE
      load_driver :require
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jdbc-jtds-1.2.7 lib/jdbc/jtds.rb