Sha256: 8d84e658c65e777e5b94783f5176a1c15b192ec0166f57d868fc5e9a464392a3

Contents?: true

Size: 699 Bytes

Versions: 8

Compression:

Stored size: 699 Bytes

Contents

warn "Jdbc-MySQL is only for use with JRuby" if (JRUBY_VERSION.nil? rescue true)
require 'jdbc/mysql/version'

module Jdbc
  module MySQL

    def self.driver_jar
      "mysql-connector-java-#{DRIVER_VERSION}.jar"
    end

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

    def self.driver_name
      'com.mysql.cj.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.mysql.autoload") )
      warn "autoloading JDBC driver on require 'jdbc/mysql'" if $VERBOSE
      load_driver :require
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
jdbc-mysql-9.1.0 lib/jdbc/mysql.rb
jdbc-mysql-8.4.0 lib/jdbc/mysql.rb
jdbc-mysql-8.2.0.1 lib/jdbc/mysql.rb
jdbc-mysql-8.2.0 lib/jdbc/mysql.rb
jdbc-mysql-8.0.30 lib/jdbc/mysql.rb
jdbc-mysql-8.0.27 lib/jdbc/mysql.rb
jdbc-mysql-8.0.20 lib/jdbc/mysql.rb
jdbc-mysql-8.0.17 lib/jdbc/mysql.rb