Sha256: 2861045dc12d336c8d58d458bd9386602fa79428a929e474994b76e506475984

Contents?: true

Size: 726 Bytes

Versions: 1

Compression:

Stored size: 726 Bytes

Contents

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

module Jdbc
  module SQLite3
    DRIVER_VERSION = '3.7.2'
    VERSION = DRIVER_VERSION + '.1'

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

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

    def self.driver_name
      'org.sqlite.JDBC'
    end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jdbc-sqlite3-3.7.2.1 lib/jdbc/sqlite3.rb