Sha256: 321488a706eaf8e8a1a7e9de7dd44929a01a6a68422214af32dc8cc92bd3203c

Contents?: true

Size: 696 Bytes

Versions: 4

Compression:

Stored size: 696 Bytes

Contents

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

module Jdbc
  module Derby

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

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

    def self.driver_name
      'org.apache.derby.jdbc.EmbeddedDriver'
    end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jdbc-derby-10.12.1.1 lib/jdbc/derby.rb
jdbc-derby-10.11.1.1 lib/jdbc/derby.rb
jdbc-derby-10.10.2.0 lib/jdbc/derby.rb
jdbc-derby-10.10.1.1 lib/jdbc/derby.rb