Skip to content

Commit 8f612f5

Browse files
committed
Update README with importance of using 0.4.1 of DBI.
1 parent 36a1809 commit 8f612f5

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

README.rdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ It is our goal to match the adapter version with each version of rails. However
130130

131131
First, you will need Ruby DBI and Ruby ODBC. If you are using the adapter under 1.9, then you need at least ruby-odbc version 0.9996. To my knowledge the ADO DBD for DBI is no longer supported. The installation below is not a comprehensive walk thru on how to get all the required moving parts like FreeTDS installed and/or configured. It will also assume gem installations of both the dependent libraries and the adapter itself.
132132

133-
It should be noted that this version of the adapter was developed using both the ancient 0.0.23 version of DBI up to the current stable release of 0.4.1. Note that DBI 0.4.1 is the minimal for ruby 1.9 compatibility. Because later versions of DBI will be changing many things, IT IS HIGHLY RECOMMENDED that you max your install to version 0.4.1 which the examples below show. For the time being we are not supporting DBI versions higher than 0.4.1. The good news is that if you were using a very old DBI with ADO, technically this adapter will still work for you, but be warned your path is getting old and may not be supported for long.
133+
It should be noted that this version of the adapter was developed using both the ancient 0.0.23 version of DBI up to the current stable release of 0.4.1. Note that DBI 0.4.1 is the minimal for ruby 1.9 compatibility. Because later versions of DBI will be changing many things, IT IS HIGHLY NECESSARY that you max your install to version 0.4.1 which the examples below show. For the time being we are not supporting DBI versions higher than 0.4.1 this they settle down on new internal implementations.
134134

135135
$ gem install dbi --version 0.4.1
136136
$ gem install dbd-odbc --version 0.2.4

test/cases/table_name_test_sqlserver.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
require 'cases/sqlserver_helper'
22
require 'models/order'
33

4+
class SqlServerRailsOrders < ActiveRecord::Base
5+
set_table_name 'rails.orders'
6+
end
7+
48
class TableNameTestSqlserver < ActiveRecord::TestCase
59

610
self.use_transactional_fixtures = false
@@ -18,5 +22,17 @@ def setup
1822
assert_sql(/SELECT \* FROM \[orders\]/) { Order.all }
1923
end
2024

25+
context 'Table scoped to user.table_name' do
26+
27+
setup do
28+
@klass = SqlServerRailsOrders
29+
end
30+
31+
should 'have no issue doing basic column reflection' do
32+
assert_nothing_raised() { @klass.columns }
33+
end
34+
35+
end
36+
2137

2238
end

0 commit comments

Comments
 (0)