Module: Jdbc::Mssql
- Defined in:
- lib/jdbc/mssql.rb,
lib/jdbc/mssql/version.rb
Constant Summary collapse
- VERSION =
'12.2.0'.freeze
Class Method Summary collapse
- .driver_version ⇒ Object
- .effective_jre_version ⇒ Object
- .jar_file ⇒ Object
- .java_specification_version ⇒ Object
- .jre_version ⇒ Object
- .load_driver ⇒ Object
Class Method Details
.driver_version ⇒ Object
15 16 17 |
# File 'lib/jdbc/mssql.rb', line 15 def self.driver_version '12.2.0' end |
.effective_jre_version ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/jdbc/mssql.rb', line 19 def self.effective_jre_version if jre_version >= 11 11 elsif jre_version == 8 8 end end |
.jar_file ⇒ Object
27 28 29 |
# File 'lib/jdbc/mssql.rb', line 27 def self.jar_file "mssql-jdbc-#{driver_version}.jre#{effective_jre_version}.jar" end |
.java_specification_version ⇒ Object
7 8 9 |
# File 'lib/jdbc/mssql.rb', line 7 def self.java_specification_version ENV_JAVA['java.specification.version'] end |
.jre_version ⇒ Object
11 12 13 |
# File 'lib/jdbc/mssql.rb', line 11 def self.jre_version java_specification_version.split('.').last.to_i end |
.load_driver ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/jdbc/mssql.rb', line 31 def self.load_driver warn 'loading JDBC driver on require "jdbc/mssql"' if $VERBOSE raise 'No JDBC driver for your java version' unless jre_version > 7 require jar_file end |