Sha256: 105cc5b62bde0e7bef58cd5c76521be72f42b233faa2c7757c5acaffa64ff409

Contents?: true

Size: 703 Bytes

Versions: 3

Compression:

Stored size: 703 Bytes

Contents

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

module Jdbc
  module Vertica

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

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jdbc-vertica-0.0.3 lib/jdbc/vertica.rb
jdbc-vertica-0.0.2 lib/jdbc/vertica.rb
jdbc-vertica-0.0.1 lib/jdbc/vertica.rb