Skip to content

Commit 0b48b17

Browse files
committed
[Rails3] Some readme and copy changes.
1 parent d8b9db5 commit 0b48b17

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

MIT-LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2008
1+
Copyright (c) 2008-2010
22

33
Permission is hereby granted, free of charge, to any person obtaining
44
a copy of this software and associated documentation files (the

README.rdoc

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ http://wiki.github.com/rails-sqlserver/2000-2005-adapter/rails-db-rake-tasks
3737
Because this adapter is primarily coded to SQL Server 2000/2005, it does not take advantage of many of the things in 2008 that would speed up the code. At some point in the future there will be a branch of this code that is specifically targeted for 2008. That adapter version will remove much of the dirty innards of this version that are meant to code around many previous SQL Server 2000/2005 short comings, the biggest being no limit/offset.
3838

3939

40-
4140
==== Date/Time Data Type Hinting
4241

4342
Both SQL Server 2000 and 2005 do not include native data types for just 'date' or 'time', it only has 'datetime'. To pass the ActiveRecord tests we implemented two simple class methods that can teach your models to coerce column information to be cast correctly. Simply past a list of symbols to either the <tt>coerce_sqlserver_date</tt> or <tt>coerce_sqlserver_time</tt> methods that correspond to 'datetime' columns that need to be cast correctly.
@@ -49,12 +48,14 @@ Both SQL Server 2000 and 2005 do not include native data types for just 'date' o
4948

5049
This implementation has some limitations. To date we can only coerce date/time types for models that conform to the expected ActiveRecord class to table naming convention. So a table of 'foo_bar_widgets' will look for coerced types in the FooBarWidget class if it exists.
5150

51+
5252
==== Executing Stored Procedures
5353

5454
Every class that sub classes ActiveRecord::Base will now have an execute_procedure class method to use. This method takes the name of the stored procedure which can be a string or symbol and any number of variables to pass to the procedure. Arguments will automatically be quoted per the connection's standards as normal. For example.
5555

5656
Account.execute_procedure :update_totals, 'admin', nil, true
5757

58+
5859
==== Native Data Type Support
5960

6061
Currently the following custom data types have been tested for schema definitions.
@@ -124,18 +125,21 @@ By default all queries to the INFORMATION_SCHEMA table is silenced. If you think
124125

125126
ActiveRecord::ConnectionAdapters::SQLServerAdapter.log_info_schema_queries = true
126127

128+
127129
==== Auto Connecting
128130

129131
By default the adapter will auto connect to lost DB connections. For every query it will retry at intervals of 2, 4, 8, 16 and 32 seconds. During each retry it will callback out to ActiveRecord::Base.did_retry_sqlserver_connection(connection,count). When all retries fail, it will callback to ActiveRecord::Base.did_lose_sqlserver_connection(connection). Both implementations of these methods are to write to the rails logger, however, they make great override points for notifications like Hoptoad. If you want to disable automatic reconnections use the following in an initializer.
130132

131133
ActiveRecord::ConnectionAdapters::SQLServerAdapter.auto_connect = false
132134

133135

136+
134137
== Versions
135138

136139
It is our goal to match the adapter version with each version of rails. However we will track our own tiny version independent of ActiveRecord. For example, an adapter version of 2.2.x will work on any 2.2.x version of ActiveRecord. This convention will be used in both the Git tags as well as the Rubygems versioning.
137140

138141

142+
139143
== Installation
140144

141145
You will need Ruby ODBC. If you are using the adapter under 1.9, then you need at least ruby-odbc version 0.9996. ODBC is the preferred mode, however if you are using IronRuby you can use the ADONET connection mode which uses native System.Data connection. Other connection modes may be supported, possibly a straight FreeTDS layer. The sky is the limit now and we have a code that can be accept these optional transports. If you are interested in helping, open a ticket and submit a patch. Or start a conversation on the Google Group.
@@ -151,6 +155,8 @@ Here are some external links for libraries and/or tutorials on how to install an
151155
* http://www.ch-werner.de/rubyodbc/
152156

153157

158+
159+
154160
== IronRuby ADONET Mode
155161

156162
A few details on this implementation. All that is needed in your database.yml configuration file is "mode: adonet" vs "odbc" and if you are running IronRuby, the connection will be native. You can also specify an "integrated_security: true" option in your configuration, remember to remove the username/password options too. To use this adapter, you will not need need ANY DBI middle layer or special extension gems to the adapter.
@@ -164,6 +170,7 @@ Currently IronRuby is passing most of the ActiveRecord and Adapter tests. Here i
164170
http://gist.github.com/381101
165171

166172

173+
167174
== Contributing
168175

169176
If you’d like to contribute a feature or bugfix, thanks! To make sure your fix/feature has a high chance of being added, please read the following guidelines. First, ask on the Google list, IRC, or post a ticket on github issues. Second, make sure there are tests! We will not accept any patch that is not tested. Please read the RUNNING_UNIT_TESTS file for the details of how to run the unit tests.
@@ -173,9 +180,10 @@ If you’d like to contribute a feature or bugfix, thanks! To make sure your fix
173180
* IRC Room: #rails-sqlserver on irc.freenode.net
174181

175182

176-
== Credits
177183

178-
Many many people have contributed. If you do not see your name here and it should be let us know.
184+
== Credits & Contributions
185+
186+
Many many people have contributed. If you do not see your name here and it should be let us know. Also, many thanks go out to those that have pledged financial contributions.
179187

180188
* Ken Collins
181189
* Murray Steele
@@ -184,7 +192,8 @@ Many many people have contributed. If you do not see your name here and it shoul
184192
* Tom Ward
185193

186194

195+
187196
== License
188197

189-
Copyright © 2008. It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.
198+
Copyright © 2008-2010. It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.
190199

0 commit comments

Comments
 (0)