Skip to content

Commit 815775d

Browse files
committed
Update README.
1 parent 275c775 commit 815775d

File tree

1 file changed

+36
-33
lines changed

1 file changed

+36
-33
lines changed

README.md

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,11 @@
44
[![Gem Version](http://img.shields.io/gem/v/activerecord-sqlserver-adapter.svg?style=flat)](https://rubygems.org/gems/activerecord-sqlserver-adapter)
55
[![Gitter chat](https://img.shields.io/badge/%E2%8A%AA%20GITTER%20-JOIN%20CHAT%20%E2%86%92-brightgreen.svg?style=flat)](https://gitter.im/rails-sqlserver/activerecord-sqlserver-adapter)
66

7-
**This project is looking for a new maintainers. Join the [discusion here](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues/364)**
7+
![kantishna-wide](https://cloud.githubusercontent.com/assets/2381/5895051/aa6a57e0-a4e1-11e4-95b9-23627af5876a.jpg)
88

9-
The SQL Server adapter for ActiveRecord. If you need the adapter for SQL Server 2000, you are still in the right spot. Just install the latest 2.3.x version of the adapter. Note, we follow a rational versioning policy that tracks ActiveRecord. That means that our 2.3.x version of the adapter is only for the latest 2.3 version of Rails. We also have stable branches for each major/minor release of ActiveRecord.
9+
## Code Name Kantishna
1010

11-
12-
## What's New
13-
14-
* Rails 4.0 and 4.1 support
15-
* Ruby 2.0 and 2.1 support
11+
The SQL Server adapter for ActiveRecord. If you need the adapter for SQL Server 2008 or 2005, you are still in the right spot. Just install the latest 3.2.x to 4.1.x version of the adapter. We follow a rational versioning policy that tracks ActiveRecord. That means that our 4.2.x version of the adapter is only for the latest 4.2 version of Rails. We also have stable branches for each major/minor release of ActiveRecord.
1612

1713

1814
#### Testing Rake Tasks Support
@@ -32,32 +28,39 @@ Account.execute_procedure :update_totals, 'admin', nil, true
3228
Account.execute_procedure :update_totals, named: 'params'
3329
```
3430

35-
#### Native Data Type Support
3631

37-
Currently the following custom data types have been tested for schema definitions.
38-
39-
* char
40-
* nchar
41-
* nvarchar
42-
* ntext
43-
* varchar(max)
44-
* nvarchar(max)
32+
#### Native Data Type Support
4533

46-
For example:
34+
We support every data type supported by FreeTDS and then a few more. All simplified Rails types in migrations will coorespond to a matching SQL Server national data type. Here is a basic chart. Always check the `initialize_native_database_types` method for an updated list.
4735

4836
```ruby
49-
create_table :sql_server_custom_types, force: true do |t|
50-
t.column :ten_code, :char, limit: 10
51-
t.column :ten_code_utf8, :nchar, limit: 10
52-
t.column :title_utf8, :nvarchar
53-
t.column :body, :varchar_max # Creates varchar(max)
54-
t.column :body_utf8, :ntext
55-
t.column :body2_utf8, :nvarchar_max # Creates nvarchar(max)
56-
end
37+
integer: { name: 'int', limit: 4 }
38+
bigint: { name: 'bigint' }
39+
boolean: { name: 'bit' }
40+
decimal: { name: 'decimal' }
41+
money: { name: 'money' }
42+
smallmoney: { name: 'smallmoney' }
43+
float: { name: 'float' }
44+
real: { name: 'real' }
45+
date: { name: 'date' }
46+
datetime: { name: 'datetime' }
47+
timestamp: { name: 'datetime' }
48+
time: { name: 'time' }
49+
char: { name: 'char' }
50+
varchar: { name: 'varchar', limit: 8000 }
51+
varchar_max: { name: 'varchar(max)' }
52+
text_basic: { name: 'text' }
53+
nchar: { name: 'nchar' }
54+
string: { name: 'nvarchar', limit: 4000 }
55+
text: { name: 'nvarchar(max)' }
56+
ntext: { name: 'ntext' }
57+
binary_basic: { name: 'binary' }
58+
varbinary: { name: 'varbinary', limit: 8000 }
59+
binary: { name: 'varbinary(max)' }
60+
uuid: { name: 'uniqueidentifier' }
61+
ss_timestamp: { name: 'timestamp' }
5762
```
5863

59-
Manually creating a `varchar(max)` is not necessary since this is the default type created when specifying a `:text` field. As time goes on we will be testing other SQL Server specific data types are handled correctly when created in a migration.
60-
6164

6265
#### Force Schema To Lowercase
6366

@@ -130,6 +133,7 @@ ActiveRecord::ConnectionAdapters::SQLServerAdapter.showplan_option = 'SHOWPLAN_X
130133
```
131134
**NOTE:** The method we utilize to make SHOWPLANs work is very brittle to complex SQL. There is no getting around this as we have to deconstruct an already prepared statement for the sp_executesql method. If you find that explain breaks your app, simple disable it. Do not open a github issue unless you have a patch. Please [consult the Rails guides](http://guides.rubyonrails.org/active_record_querying.html#running-explain) for more info.
132135

136+
133137
## Versions
134138

135139
The adapter follows a rational versioning policy that also tracks ActiveRecord's major and minor version. That means the latest 3.1.x version of the adapter will always work for the latest 3.1.x version of ActiveRecord.
@@ -141,22 +145,20 @@ The adapter has no strict gem dependencies outside of ActiveRecord. You will hav
141145

142146
```ruby
143147
gem 'tiny_tds'
144-
gem 'activerecord-sqlserver-adapter', '~> 4.0.0'
148+
gem 'activerecord-sqlserver-adapter', '~> 4.2.0'
145149
```
146150

147-
If you want to use ruby ODBC, please use at least version 0.99992 since that contains fixes for both native types as well as fixes for proper encoding support under 1.9. If you have any troubles installing the lower level libraries for the adapter, please consult the wiki pages for various platform installation guides. Tons of good info can be found and we ask that you contribute too!
151+
If you want to use ruby ODBC, please use the latest least. If you have any troubles installing the lower level libraries for the adapter, please consult the wiki pages for various platform installation guides. Tons of good info can be found and we ask that you contribute too!
148152

149153
http://wiki.github.com/rails-sqlserver/activerecord-sqlserver-adapter/platform-installation
150154

151155

152-
153156
## Contributing
154157

155-
If you would 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.
158+
If you would 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 Gitter, 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.
156159

157160
* Github: http://github.com/rails-sqlserver/activerecord-sqlserver-adapter
158-
* Google Group: http://groups.google.com/group/rails-sqlserver-adapter
159-
* IRC Room: #rails-sqlserver on irc.freenode.net
161+
* Gitter: https://gitter.im/rails-sqlserver/activerecord-sqlserver-adapter
160162

161163

162164
## Credits & Contributions
@@ -169,6 +171,7 @@ Up-to-date list of contributors: http://github.com/rails-sqlserver/activerecord-
169171

170172
* metaskills (Ken Collins)
171173
* Annaswims (Annaswims)
174+
* wbond (Will Bond)
172175
* Thirdshift (Garrett Hart)
173176
* h-lame (Murray Steele)
174177
* vegantech

0 commit comments

Comments
 (0)