Sha256: 1601eae2f4c2f8b0d1d45e8ce8b1f726c51d347a8653b75171aee33406916ba2

Contents?: true

Size: 667 Bytes

Versions: 92

Compression:

Stored size: 667 Bytes

Contents

ArJdbc::ConnectionMethods.module_eval do
  def derby_connection(config)
    config[:adapter_spec] ||= ::ArJdbc::Derby

    return jndi_connection(config) if jndi_config?(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'

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

Version data entries

92 entries across 92 versions & 3 rubygems

Version Path
activerecord-jdbc-alt-adapter-61.3.0-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-adapter-61.3-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-alt-adapter-60.3.0-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-alt-adapter-61.2.0-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-adapter-70.0-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-adapter-70.0.pre-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-adapter-61.2-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-alt-adapter-60.2.0-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-alt-adapter-61.1.0-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-adapter-61.1-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-adapter-60.4-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-adapter-52.8-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-alt-adapter-61.0.0-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-alt-adapter-60.1.0-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-alt-adapter-52.6.0-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-alt-adapter-51.7.0-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-alt-adapter-50.7.0-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-adapter-61.0-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-adapter-60.3-java lib/arjdbc/derby/connection_methods.rb
activerecord-jdbc-adapter-52.7-java lib/arjdbc/derby/connection_methods.rb