Sha256: 93cd3c2fb733f1b3468d1905b3c73ac589b53df49911ccd8ac9f3d8b1a2a477d

Contents?: true

Size: 858 Bytes

Versions: 1

Compression:

Stored size: 858 Bytes

Contents

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

module Jdbc
  module SQLite3

    def self.driver_jar
      version = DRIVER_VERSION.split( '.' )
      if version.size > 3
        'sqlite-jdbc-%s.%s.%s-%s.jar' % version # 3.7.15-SNAPSHOT
      else
        "sqlite-jdbc-#{DRIVER_VERSION}.jar" # 3.7.2
      end
    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.15.SNAPSHOT lib/jdbc/sqlite3.rb