Sha256: 14f80220efd4542d805c8129048f5260abdf35e5e0853eea27b859777a507541

Contents?: true

Size: 606 Bytes

Versions: 6

Compression:

Stored size: 606 Bytes

Contents

ArJdbc::ConnectionMethods.module_eval do
  def derby_connection(config)
    begin
      require 'jdbc/derby'
      ::Jdbc::Derby.load_driver(:require) if defined?(::Jdbc::Derby.load_driver)
    rescue LoadError # assuming driver.jar is on the class-path
    end

    config[:url] ||= "jdbc:derby:#{config[:database]};create=true"
    config[:driver] ||= defined?(::Jdbc::Derby.driver_name) ?
      ::Jdbc::Derby.driver_name : 'org.apache.derby.jdbc.EmbeddedDriver'
    config[:adapter_spec] ||= ::ArJdbc::Derby

    embedded_driver(config)
  end
  alias_method :jdbcderby_connection, :derby_connection
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
activerecord-jdbc-adapter-1.3.4 lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-adapter-1.3.3 lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-adapter-1.3.2 lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-adapter-1.3.1 lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-adapter-1.3.0 lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-adapter-1.3.0.rc1 lib/arjdbc/derby/connection_methods.rb