Skip to content

Commit 785ba4d

Browse files
author
Rob Widmer
committed
Initial overrides to work with the activerecord-sqlserver-adapter gem to support MSSQL on Rails 5.0
1 parent 082a2f7 commit 785ba4d

File tree

8 files changed

+444
-52
lines changed

8 files changed

+444
-52
lines changed

lib/arjdbc/abstract/core.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def initialize(connection, logger = nil, config = {})
2222

2323
connection.configure_connection # will call us (maybe)
2424
end
25-
25+
2626
# Retrieve the raw `java.sql.Connection` object.
2727
# The unwrap parameter is useful if an attempt to unwrap a pooled (JNDI)
2828
# connection should be made - to really return the 'native' JDBC object.
@@ -54,7 +54,7 @@ def translate_exception(e, message)
5454
case e
5555
when SystemExit, SignalException, NoMemoryError then e
5656
when ActiveModel::RangeError, TypeError, RuntimeError then e
57-
else ActiveRecord::StatementInvalid.new(message)
57+
else super
5858
end
5959
end
6060

lib/arjdbc/mssql.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1+
require 'jdbc/mssql'
12
require 'arjdbc'
23
require 'arjdbc/mssql/adapter'
34
require 'arjdbc/mssql/connection_methods'
4-
module ArJdbc
5-
MsSQL = MSSQL # compatibility with 1.2
6-
end
7-
ArJdbc.warn_unsupported_adapter 'mssql', [4, 2] # warns on AR >= 4.2

0 commit comments

Comments
 (0)