-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finish updating (explicitly loaded) driver-jars
besides we make sure that (jdbc-xxx gem) .jars are only loaded (required) when first connection is attempted this avoids e.g. sqlite-jdbc.jar being always among loaded features when discover AR-JDBC extensions run
- Loading branch information
Showing
22 changed files
with
55 additions
and
34 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
activerecord-jdbcderby-adapter/lib/active_record/connection_adapters/jdbcderby_adapter.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
require 'arjdbc/derby' | ||
Jdbc::Derby.load_driver(:require) |
1 change: 1 addition & 0 deletions
1
activerecord-jdbch2-adapter/lib/active_record/connection_adapters/jdbch2_adapter.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
require 'arjdbc/h2' | ||
Jdbc::H2.load_driver(:require) |
1 change: 1 addition & 0 deletions
1
activerecord-jdbchsqldb-adapter/lib/active_record/connection_adapters/jdbchsqldb_adapter.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
require 'arjdbc/hsqldb' | ||
Jdbc::HSQLDB.load_driver(:require) |
3 changes: 3 additions & 0 deletions
3
activerecord-jdbcmssql-adapter/lib/active_record/connection_adapters/jdbcmssql_adapter.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
require 'arjdbc/mssql' | ||
# NOTE: the adapter has only support for working with the | ||
# open-source jTDS driver (won't work with MS's driver) ! | ||
Jdbc::JTDS.load_driver(:require) |
1 change: 1 addition & 0 deletions
1
activerecord-jdbcmysql-adapter/lib/active_record/connection_adapters/jdbcmysql_adapter.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
require 'arjdbc/mysql' | ||
Jdbc::MySQL.load_driver(:require) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
module Jdbc | ||
module HSQLDB | ||
VERSION = "2.2.9" | ||
|
||
def self.driver_jar | ||
"hsqldb-#{VERSION}.jar" | ||
end | ||
|
||
def self.load_driver(method = :load) | ||
send method, driver_jar | ||
end | ||
end | ||
end | ||
if RUBY_PLATFORM =~ /java/ | ||
require "hsqldb-#{Jdbc::HSQLDB::VERSION}.jar" | ||
elsif $VERBOSE | ||
warn "jdbc-hsqldb is only for use with JRuby" | ||
|
||
if $VERBOSE && (JRUBY_VERSION.nil? rescue true) | ||
warn "Jdbc-HSQLDB is only for use with JRuby" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
module Jdbc | ||
module JTDS | ||
VERSION = "1.3.0" | ||
|
||
def self.driver_jar | ||
"jtds-#{VERSION}.jar" | ||
end | ||
|
||
def self.load_driver(method = :load) | ||
send method, driver_jar | ||
end | ||
end | ||
end | ||
if RUBY_PLATFORM =~ /java/ | ||
require "jtds-#{Jdbc::JTDS::VERSION}.jar" | ||
elsif $VERBOSE | ||
warn "jdbc-jtds is only for use with JRuby" | ||
|
||
if $VERBOSE && (JRUBY_VERSION.nil? rescue true) | ||
warn "Jdbc-JTDS is only for use with JRuby" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
module Jdbc | ||
module MySQL | ||
VERSION = "5.1.22" | ||
|
||
def self.driver_jar | ||
"mysql-connector-java-#{VERSION}.jar" | ||
end | ||
|
||
def self.load_driver(method = :load) | ||
send method, driver_jar | ||
end | ||
end | ||
end | ||
if RUBY_PLATFORM =~ /java/ | ||
require "mysql-connector-java-#{Jdbc::MySQL::VERSION}.jar" | ||
elsif $VERBOSE | ||
warn "jdbc-mysql is only for use with JRuby" | ||
|
||
if $VERBOSE && (JRUBY_VERSION.nil? rescue true) | ||
warn "Jdbc-MySQL is only for use with JRuby" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
require 'arjdbc/jdbc' | ||
jdbc_require_driver 'jdbc/derby' | ||
require 'arjdbc/derby/connection_methods' | ||
require 'arjdbc/derby/adapter' | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
require 'arjdbc/jdbc' | ||
jdbc_require_driver 'jdbc/h2' | ||
require 'arjdbc/h2/connection_methods' | ||
require 'arjdbc/h2/adapter' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
require 'arjdbc/jdbc' | ||
jdbc_require_driver 'jdbc/hsqldb' | ||
require 'arjdbc/hsqldb/connection_methods' | ||
require 'arjdbc/hsqldb/adapter' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
require 'arjdbc/jdbc' | ||
jdbc_require_driver 'jdbc/jtds', 'jdbc-mssql' | ||
require 'arjdbc/mssql/connection_methods' | ||
require 'arjdbc/mssql/adapter' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
require 'arjdbc/jdbc' | ||
jdbc_require_driver 'jdbc/mysql' | ||
require 'arjdbc/mysql/connection_methods' | ||
require 'arjdbc/mysql/adapter' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
require 'arjdbc/jdbc' | ||
jdbc_require_driver 'jdbc/postgres' | ||
require 'arjdbc/postgresql/connection_methods' | ||
require 'arjdbc/postgresql/adapter' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
require 'arjdbc/jdbc' | ||
jdbc_require_driver 'jdbc/sqlite3' | ||
require 'arjdbc/sqlite3/connection_methods' | ||
require 'arjdbc/sqlite3/adapter' |